code: @SuppressWarnings("unchecked")
    public static <T> T[] shallowCopy(T[] array) {
  
      Assert.notNull(array, "Array is required");
  
      T[] arrayCopy = (T[]) Array.newInstance(array.getClass().getComponentType(), array.length);
  
      System.arraycopy(array, 0, arrayCopy, 0, array.length);
  
      return arrayCopy;
    }
docs: Shallowly copies the given array into a new array of the same {@link Class type}.
  
  @param <T> {@link Class type} of the array elements.
  @param array array to copy.
  @return a shallow copy of the original array.
  @throws IllegalArgumentException if the array is {@literal null}.
  @see #deepCopy(Object[])