Tying data to variables so as to not write lots of if statements

The code running on the Arduino (I.E. a sketch).