Random.ArrayRandom functions for arrays.
(shuffle ?state a) performs a destructive in-place Fisher–Yates shuffle on the array a; O(n).
(sample_with ?state n a) returns a random sample, with replacement, of size n of the array a; tail-recursive, O(n).