private static Object @NotNull [] createArraySet(Object @NotNull [] elements, int index, Object element) {
    int len = elements.length;
    Object[] newElements = Arrays.copyOf(elements, len, Object[].class);
    newElements[index] = element;
    return newElements;
  }
private static Object @NotNull [] createArraySet(Object @NotNull [] elements, int index, Object element)