You are correctly generating the random number in your desired range (well close, you say 1000, but your code says 100).
However, you never assign that random value to an index in the array.
So if you want to assign a random number between your range to every index of an array of size 5, Doing something like the following:
for (int i = 0; i < 5; i++) //populate each array index of array of size 5
{
myArray[i] = rand() % 1000; //assign random number to index in the array
printf("Random: %d\n", myArray[i]);
}
Currently what your code is doing is saying myArray[<at random index>]
do nothing (likely optimized out altogether by the compiler - would also expect the compiler to complain about a redeclaration of a variable with the same name).
Now, if your question is randomly generating array sizes, that's a different answer all together...