Jerome suggested that this would be the killer feature that other R packages could build on. I presume R will allow you to expose an array of (e.g.) int32 as a vector?
Have to explore this option ...
See how this is done for Python-C low-level interface https://github.com/tskit-dev/tskit/blob/python/_tskitmodule.c