docs: private static <T> int indexOfNullElement(T[] array) {
          for (int i = 0; i < array.length; i++) {
              if (array[i] == null) {
                  return i;
              }
          }
          return -1;
      }