Another solution that works for any number of widgets and does not require array iteration:
Wrap the native checkbox with a User Widget, dispatch its state and self reference:
And in the main widget holding checkboxes:
You probably don’t even need that boolean but you may find another use for it!
edit: Another benefit of wrapping User Widgets is that you can now easily stylise those checkboxes so they stay uniform throughout the menus. Makes maintenance / adjustments a breeze.