Turning image into tiles and random movement

Sorry if this has already been a post, but ive searched and cant find it.

Im looking to convert an image into set number of tiles, and have the tiles just randomly move around for a few seconds before falling back into place to create the image. Id have this looped indefinately aswell.

If anyone knows any tutorials that would be much appreciated.