I've had a couple versions of the static array library floating around already (and maybe under different names). In a nutshell, it gives you pre-allocated C arrays that look like Lua tables, but are safe from garbage collection.
This new release is a major upgrade of the original library, and adds support for n-dimensional array indexing (the array is still inherently linear, this is a convenience layer on top of that). There's also some other conveniences added, like cloning.
http://hocuspocus.taloncrossing.com/rii/xlua-array.zip
This module is also documented now: http://jaquadro.homedns.org/~xlua/in...?ext_array.htm
My apologies if it looks overly pedantic, but that's better than no documentation at all!
In the future, I plan on interfacing this module with other modules like XLua Surfaces and XLuaGL, where the low level nature of the static array would be an excellent match for managing pixel buffers.
And while I haven't added it in this release, I would also like to add some basic import/export capabilities of the data, since I've received a few requests for that in the past.