Unit test for array randomization helper functions