Refactored array_random() selection.