docs: public static Object duplicateArray(Object source) {
  
          int size = Array.getLength(source);
          Object newarray =
              Array.newInstance(source.getClass().getComponentType(), size);
  
          System.arraycopy(source, 0, newarray, 0, size);
  
          return newarray;
      }