asSlice

open fun asSlice(array: MemorySegment, index: Long): MemorySegment

Obtains a slice of arrayParam which selects the array element at index. The returned segment has address arrayParam.address() + index * layout().byteSize()