Assign classes to layers & components to be used with variables

Is it possible to assign classes to layers, components and use in conjunction with variables?

Say I have 16 check boxes in array of 4×4. I’ll have column A,B,C,D and row 1,2,3,4. I’d like to be able to interact with these checkboxes to change state checked, unchecked by clicking them individually. But also to be able to check all in ‘column B’ or all in ‘row 3’. Is this possible?

I was also thinking there might be some way of doing it with combining it with components, if I could assign unique ‘callsigns’ to each instance of a component. I’m not sure if this is supported and it I wouldn’t be able to do that either way
without detaching component instances first.