code: private static PortablePosition createPositionForReadAccess(
              PortableNavigatorContext ctx, PortablePathCursor path, int index) throws IOException {
          FieldType type = ctx.getCurrentFieldType();
          if (type.isArrayType()) {
              if (type == FieldType.PORTABLE_ARRAY) {
                  return createPositionForReadAccessInPortableArray(ctx, path, index);
              } else {
                  return createPositionForReadAccessInPrimitiveArray(ctx, path, index);
              }
          } else {
              validateNonArrayPosition(path, index);
              return createPositionForReadAccessInFromAttribute(ctx, path, index, type);
          }
      }
docs: Create an instance of the {@PortablePosition} for direct reading in the reader class.
  The cursor and the path point to the leaf field, but there's still some adjustments to be made in certain cases.
  <p>
  - If it's a primitive array cell that is being accessed with the [number] quantifier the stream has to be
  adjusted to point to the cell specified by the index.
  <p>
  - If it's a portable attribute that is being accessed the factoryId and classId have to be read and validated.
  They are required for the portable read operation.
  <p>
  - If it's a portable array cell that is being accessed with the [number] quantifier the stream has to be
  adjusted to point to the cell specified by the index. Also the factoryId and classId have to be read and
  validated. They are required for the portable read operation.
  <p>
  If it's a whole portable array that is being accessed factoryId and classId have to be read and
  validated. The length have to be read.
  <p>
  If it's a whole primitive array or a primitive field that is being accessed there's nothing to be adjusted.