code: public static Object[] arrayPut(final Object[] array, final int pos, final Object value){
          final Object[] ret = Arrays.copyOf(array, array.length+1);
          if(pos<array.length){
              System.arraycopy(array, pos, ret, pos+1, array.length-pos);
          }
          ret[pos] = value;
          return ret;
      }
docs: /* expand array size by 1, and put value at given position. No items from original array are lost