Shuffle array and ensure the returned order differs from the original when possible. If array length is 0 or 1 it is returned unchanged.
array
element type
a shuffled array that's different from the input when feasible
Shuffle
arrayand ensure the returned order differs from the original when possible. If array length is 0 or 1 it is returned unchanged.