Support for calling tablinate on AR relations

Added the same for arrays. Also reworked the parsing of the object that
is passed to generate_table.