I am able to generate a random number for array