in the module or module config/settings, I want to define an array of "menus".
Then, on every page in the page tree, except on pages inside "Admin", I want to render an array of checkboxes (InputFieldCheckboxes), one for each entry in the predefined "menus"-array.
When the content manager edits a page they will see these checkboxes, and one or more before saving the page will naturally be saved somewhere, ideally as a property of the page.
When creating the menus in the markup (e.g. top menu, footer, sidebar, you name it), one should be able to select the pages according to the values set for said field on the pages.
I'm not sure if creating adding a field and adding it to a fieldgroup and template is necessary (also this approach is quite prone to errors, I have to consider __install() and __uninstall() etc.), I managed to accomplish something very simliar with a different module (https://github.com/dtjngl/simpleSearch/blob/main/SimpleSearch.module.php), the difference was, that one renders a text field on each template and when editing a template, the entered value gets saved to the template object. Works like a charm.
Thanks for you input!