The Multiple Select (multiple_select) module provides a Form API element with a "Select All / Unselect All" functionality for checkboxes fields. This module has a configuration page in which this functionality can be applied to one (or more) content types.

The configuration page can be found in /en/admin/config/content/multiple-config.

Future development: