Domanda di colloquio di Barclays

How to write a function that takes an array of numbers and returns randomized array