Returns a random value from an enum, evenly distributed.
An index into an array of all named values is generated using the specified Index
type to determine the return value. This allows for results to be independent of usize
representation.
Prefer enumValue
if this isn’t important.
See uintLessThan
, which this function uses in most cases, for commentary on the runtime of this function.