A random sequence of integers into an array?

Hi,

I'd like to create an array of randomly sequenced integers. I want to specify the count (n) and have the resulting array containing n numbers starting at 0 but not repeating.

So for example, something like this:

for N=5: [0, 4, 3, 1, 2]

for N=10: [4, 1, 3, 8, 6, 9, 2, 5, 0, 7]

The plan is then to use this array to randomly access elements from another array in this random order. So for the n=5 example, it would result in:

data[0]

data[4]

data[3]

data[1]

data[2]

Is this possible? How do I do this?

Thanks very much.

David.