Injecting custom functions with dynamic values.

I think it would be really good to have a way to inject custom functions / code blocks the same way we can register code components and global contexts. These code blocks could then be invoked from dynamic value boxes… this way:
• similar functionality can be reused and shared between pages / components
• enhancements or fixes are easily deployed
• the functionaility can be applied by someone that might not have the knowledge to actually code that dynamic code but still be in charge of creating a page