Checkbox form checking all boxes

I’m trying to create an email preferences form that has 5 options and a “Unsubscribe from all” box that would select all the options. Is this possible?

Yes, but you will want to think about how you are implementing the back-end processes.
I’d usually load and save the checkboxes for the individual options, and then have buttons ( not a checkbox ), that allows Subscribe to All and Unsubscribe from All.

Those just run some js to check / uncheck the checkboxes.