C Interface -- How to store an element in a C array

Is this just a simple example:

rv_workspace = Libc.calloc(nrvs,sizeof(ttvfast_RV_entry))
...
    pointer_to_array(
        convert(Ptr{ttvfast_RV_entry},rv_workspace),
        nrvs
    )

Or are you actually allocating the memory in Julia?
If so, just create it as a regular Julia array in the first place, and call pointer on it if you need a pointer (although ccall does that automatically).

If you’re allocating memory from the C side, you can use unsafe_wrap.