It's not possible to pass a lua table to a C function

In case someone finds this useful, I added an Array type to version 2.3.0 of my pdbase toybox. If you're using toybox.py you can add it like so:

toybox add pdbase
toybox update

or you can check out the repo here.

Basically this is an interop class that can be created in C or LUA and passed back and forth between both. If you pre-allocated the number of items stored when creating the array, it's actually faster than LUA's tables in most cases.

You can add ints, floats, strings, booleans or LUA objects but unfortunately you cannot, at this point, retrieve a LUA object from LUA because of a missing SDK method.