Handling of randomness for Ruby arrays.