shuffle

Randomly shuffles elements in this array in-place.

fun <T> Array<T>.shuffle()(source)
val numbers = arrayOf(1, 2, 3, 4, 5)
numbers.shuffle()
println(numbers.contentToString()) // e.g., [3, 1, 5, 2, 4]

Source