Introduce templates to create ast.lua and net.lua.
Add tests for array limits.