speed up getting a small random sample from a big array