Value to variable name

No. Maybe you need another array to point to the arrays you are using.

 char* sp_active[] = {sp_sw3, sp_ir8};