mesh.vertices copies the table when you assign to it — it doesn’t hold a reference.
So for example:
local myVerts = { ... some verts ... }
-- This *copies* myVerts into m.vertices, allocating the internal buffer if necessary
m.vertices = myVerts
table.insert( myVerts, newVertex ) -- does not effect mesh m
To format your code, fence it between a set of three tildes: ~~~