gary
The function app.form_open() uses the form ID (instead of a form name) because for some entities (like forms or presets) we currently do not have placeholders. Its not super convenient, but workable for now.
You can generally centralize functions - that often makes sense. In the case of record duplication however, this will not work. Reason being, that every form has different fields and even if you would always copy all field values, functions have scopes. A global function for example cannot access fields on a particular form. While a form assigned function can only access fields from the corresponding form.
You could still use a global function for some generic task (like working with the value store) - for the value retrieval and creation of a new record, you will need specific form-assigned functions.
A way back, we considered a generic record duplication action on a form level, which would just copy/paste all values - but we found that in most cases this was not sufficient because there were always edge cases. We might revisit the topic in the future, but functions provide full flexibility in the meantime, to implement record duplication however desired.