ByteBuffer getSlabForWrite() {
    int slabIdx = (int) (writeOffset >>> slabBits);
    while (arrays.size() <= slabIdx) {
      arrays.add(newSlab());
    }
    return arrays.get(slabIdx);
  }
Returns the slab that the next value should be written to.
planetiler-core/src/main/java/com/onthegomap/planetiler/collection/AppendStoreRam.java