Assuming that you are using each frame as a different piece, you can do it like this:
1. Create an array with dimensions (12, 1, 1)
2. Give the array a variable "n"
3. Add the following events on start (or put in a function):
//First set the values of the array to 0-11, one for each frame.
Array | for each XYZ element : Array | Set value at (Array.CurX, Array.CurY) to Array.CurX
//Shuffle the array
System | For "i" from 0 to array.Width-1 :
>> Array | Set n to floor(random(Array.Width-loopindex("i")))
>> Array | Push back Array.At(n,0) on X axis
>> Array | Delete index n from X axis
//Assign frames to the pieces using the shuffled array values
Pieces | Set Animation Frame to Array.At(self.IID)
To be able to use the IID in this way to assign you shouldn't have any other puzzle pieces in the scene. If you do need additional pieces in the scene for some reason, then instead give the piece sprite a variable e.g. pieceNo, number the pieces 0-11 and use that pieceNo instead of the IID.
Hope that helps! :-)