code: public static <T> void shuffle(T[] array, Random rnd) {
          //Implementing Fisher-Yates shuffle
          T tmp;
          for (int i = array.length - 1; i > 0; --i) {
              int index = rnd.nextInt(i + 1);
              
              tmp = array[index];
              array[index] = array[i];
              array[i] = tmp;
          }
      }
docs: Shuffles the values of any array in place using the provided random generator.
  
  @param <T>
  @param array
  @param rnd