code: private Object writeArray(SerIterator itemIterator) {
          List<Object> result = new ArrayList<>();
          while (itemIterator.hasNext()) {
              itemIterator.next();
              result.add(writeObject(itemIterator.valueType(), itemIterator.value(), itemIterator));
          }
          return result;
      }
docs: write list/set/array