private static Object @NotNull [] createArrayRemove(Object @NotNull [] elements, int index) {
    int len = elements.length;
    Object[] newElements = len == 1 ? ArrayUtilRt.EMPTY_OBJECT_ARRAY : new Object[len - 1];
    if (index != 0) {
      System.arraycopy(elements, 0, newElements, 0, index);
    }
    int numMoved = len - index - 1;
    if (numMoved != 0) {
      System.arraycopy(elements, index + 1, newElements, index, numMoved);
    }
    return newElements;
  }
private static Object @NotNull [] createArrayRemove(Object @NotNull [] elements, int index)