Yea I know that indexes starts at zero, but I've noticed that if I have array for example of 3 elements and I index it 1, 2, 3 always everything is ok. So I index my arrays from 1 because it's much easyer to understand.
Then you will have to create an array of one more than you actually need. The compiler will let you do
1 2 3
threads[3];
x = thread[3];
If you read index 3 and your program doesn't crash you're very lucky. The contents of that memory could be anything, Doing this will guarantee your program to be unpredictable, crash and generally be unstable.