An array extension to randomly sample from an array