Arrays are 0 indexed, but when you define their size you are saying how many elements you want.
Your array size should be the number of encoders your using.
if you have
int numbers[3];
that array will store 3 numbers, with the first being at index 0, second at index 1, third at index 2.