More efficient random array generation.