Extra randomized functions on arrays.
Generate a random array of random length given a minimum length and a maximum length.
Sample with replacement: produce a randomly selected element of the
array, or Nothing for an empty array. Takes O(1) time.
Sample without replacement: produce a randomly selected element of the
array, and the array with that element omitted (shifting all later elements
down). If the array is empty, the selected element will be Nothing.
Shuffle the array using the Union-Find data structure with path compression algorithm. Takes O(n log n) space and time.
Generate a random array of given size given a random generator