Return randomized array...help

can someone show me a simple “randomize array” function. maybe a prototype that just returns a randomized version of an array such as:

array = [1,2,3,4,2]
array.randomize;
trace(array) // traces 5,1,4,3,2 or whatever.

I started on one myself but got stuck when, in the prototype, looping through “this” also counted the function being passed, as well as the elements of the array, and i can’t seem to remember why it does that.

Thanks