Array to store values - Do I need to manual update

Thanks for the help and advice,
Sounds like I will just need to be careful if and when I change which variable is store in which element of the array, the variables will change during the code so I cannot define them.

On the other 2 notes;

  1. Yep I will be making sure that the arrays are declared as the smallest type needed, just use int in the example for no reason.
  2. a, b and array were just example names for the example, don't worry I have seen to many "value1"s to do it. The case approach you use (specific casing style per type of object) does make a lot of sense and I will remember to use that (also got to get better at commenting everything!).

Edit:

Neither of your examples will work as written the way you are expecting them to.

does this imply that they will compile and run but not work correctly or did you mean "Neither of your examples will work as written.". If they will compile and run could you guesse what the expected result be?