Solved post but I'd like to mention my preferred solution. Namely, define a generic one-liner script eval_func.sh
:
#!/bin/bash
source $1 && shift && "@a"
Then call any function within any script via:
./eval_func.sh <any script> <any function> <any args>...
An issue I ran into with the accepted solution is that when sourcing my function-containing script within another script, the arguments of the latter would be evaluated by the former, causing an error.