code: protected final Object[] updateStateStorage(Object[] oldStorage, @Nullable Object defaultValue, Payload payload) {
          final Object[] result = Arrays.copyOf(oldStorage, payload.newSizeHint);
          Arrays.fill(result, oldStorage.length, result.length, defaultValue);
          return result;
      }
docs: Return a copy of the provided array with updated memory layout.
  
  @param oldStorage
  the current array
  @param defaultValue
  default value for newly allocated array positions
  @param payload
  the payload object
  
  @return a copy of the provided array with updated memory layout.