static int @NotNull [] reallocateArray(int @NotNull [] array, int index) {
    if (index < array.length) return array;
    return ArrayUtil.realloc(array, calcCapacity(array.length, index));
  }
static int @NotNull [] reallocateArray(int @NotNull [] array, int index)