I am wanting to code "mappings" in Lua rather than in C for the simplicity and beauty of Lua ;-)
So lets say in C I could have had the following:
typedef struct my_struct{
char field_1[10];
char field_2[250];
char field_3[2000];
}my_struct;
my_struct *pmy_struct;
pmy_struct = (my_struct *) some_buffer;
So I am wanting a way in Lua to have FIXED lengths on fields inside a "structure" so that the overall BUFFER OFFSETS stay in tact when it reaches the target system....
So lets say in the above struct I wanted to set "field_3" to the text "apple"......I still want that structure field to have an overall length of 2000 bytes...
You can do this with Lua.
If you wish to (or are forced to) stay with Lua 5.1, consider using the struct library.
However, the best solution available at the moment is LuaJIT; there are numerous benefits to using LuaJIT over the standard Lua implementation, but the one that most applies to you is the FFI library.
It is a common misconception that generalised languages such as Lua and Python should not (or, in ignorance, cannot) be used for low-level specifics. LuaJIT is a major first step for "smart" language that allow you to work at any level.
Lua doesn't work that way. Lua does not have "structures". It does not have "fields" which have "sizes".
It has tables, which can have values of several different types. These values are mapped to keys (which are themselves values). While you can use metatables to prevent the addition of new keys, you can't force the "size" of a value to be anything in particular.
Or, to put it another way, stop trying to program Lua like it's C. They are different languages, and you should approach each language in its own way. In C, you want to care about the size of fields, the layout of structs, etc.
The reason to use Lua (and most scripting languages) is because you don't want to care about those things. You don't want to care if the string "apple" happens to be stored in a byte array 2000 bytes in size. And if you want to care about that, then you don't want to use Lua.