shuffle an array of pointers
get a random rumber within a range