Cool, I see the problem with your code; you’re not passing the correct arguments to wp_get_attachment_image. It expects as a first argument an attachment ID. In your case, you’re passing the whole image array.
So instead of $images[$rand]
you should get the ID
out of this array.
wp_get_attachment_image( $images[$rand]['ID'], $size );
Panos