public class MyRun implements Runnable{

int[] array = new int[5];
int index;

MyRun(int value, int index){
this.index = index;
array[index] = value;
}
}