Encoder [WIP]

Work-in-progress improvements to the encoder. I'm trying to get it to be fully functioning and would appreciate help and/or code reviews.

TODOs:

* [x] Array of tables
* [ ] Nested arrays of tables