The randperm command computes a random permutation. shuffle is a synonym for randperm.
Example. Input:
Output (example):