implement array randomization in place example