code: public static Object convertArray(Connection conn, Object[] array) throws SQLException {
          Object result = null;
  
          result = createArrayOf(conn, convertJavaClassToSqlType(array.getClass().getComponentType().getSimpleName()), array);
  
          return result;
      }
docs: Converts array of Object into sql.Array
  
  @param conn  connection for which sql.Array object would be created
  @param array array of objects
  @return sql.Array from array of Object
  @throws SQLException