How to set the Function in Flow or Globally

I have in the past stored function object(s) in flow/global but that means mostly using function nodes to access them.

No Biggie but not exactly the "node-red way" (imo).

You could of course make a multifunctional subflow and use properties of msg for parameters and msg.topic as the function name.
Just be sure to use the self documenting features of the subnode to remind you how it works.