PaulS:
My question is why you are using an int array to store pin numbers. Have you got THAT many pins? Are you sure you don't need long or long long?
I have analog pins A0 - A15 for switching relays.
I have digital pins 1-50 for switching relays.
I have digital pins 51-53 for switching shift registers 1-30.