Added function for random element from array