Added a shuffle function for an array of pointers.