use Lua 5.2 __len and __ipair for bufArrays