create an array with random values 

an array with random values which lie in the given domain.
retrieve the data from database according to the array