The library, UCI2JSON, creates namespaced JSON objects from a given reference (validation) JSON structure and a package's UCI configuration (that has been placed in UBUS by procd).
The library can merge runtime default values and UCI overrides into a JSON object which holds the elements necessary to initialise a process / daemon / service. Selecting the keys with json_get_keys() of the flat JSON object and iterating of them whilst accessing the matching runtime options with json_get_var() completes the string that is passed into procd_set_param command().
Then the question is - where to 'install' a shared (generalised) set of shell script functions rather than bloat every script that would leverage the functions?