No need for arrays - MySQL can do this for you. Basically, just form a normal SELECT query as if you were retrieving a row from the table as usual, and add this to the end of it:
ORDER BY RAND()
I don't know if it's better optimization, but I like to tell MySQL how many rows I'm going to be pulling out randomly by adding a "LIMIT n" after that, where n is obviously the number of rows I want, e.g.
SELECT `firstName`, `lastName` FROM `myTable` WHERE `type` = 'user' ORDER BY RAND() LIMIT 5