tweaked array randomization to prevent empty set warnings in tests