withIndex

fun ByteBuffer.withIndex(): Iterable<IndexedValue<Byte>>
fun ShortBuffer.withIndex(): Iterable<IndexedValue<Short>>
fun IntBuffer.withIndex(): Iterable<IndexedValue<Int>>
fun LongBuffer.withIndex(): Iterable<IndexedValue<Long>>
fun FloatBuffer.withIndex(): Iterable<IndexedValue<Float>>
fun DoubleBuffer.withIndex(): Iterable<IndexedValue<Double>>
fun CharBuffer.withIndex(): Iterable<IndexedValue<Char>>

Returns a lazy Iterable that wraps each element of the original array into an IndexedValue containing the index of that element and the element itself.