code: public static int addDataForArr(FlatBufferBuilder bufferBuilder, INDArray arr) {
          DataBuffer toAdd = arr.isView() ? arr.dup().data() : arr.data();
          int offset = DataBufferStruct.createDataBufferStruct(bufferBuilder,toAdd);
          int ret = Buffer.createBuffer(bufferBuilder,offset,toAdd.length() * toAdd.getElementSize());
          return ret;
  
      }
docs: Create a {@link Buffer}
  representing the location metadata of the actual data
  contents for the ndarrays' {@link DataBuffer}
  @param bufferBuilder the buffer builder in use
  @param arr the array to add the underlying data for
  @return the offset added