Select random element in an array (array prototype function)