Sure you can. The mathematical function of range creates an array, which contains numbers from the low to high limits passed to it. So, the first line of:
$nums=range(1,100);
makes an array that contains the numbers 1 through 100, in order, with no dups.
The shuffle command works by mixing array elements, no new elements are created, and none are duplicated during the shuffling process.