Broken: Change the schema of the typedocs object

Those random arrays weren't actually great. This commit turns them into
hashes instead, which is terser and more indexable for anyone trying to
get type docs one at a time instead of all at once. This commit also turns
several loops into inject statements instead, in an attempt to be more
functional-programming-ish. I think it helped make the code more comprehensible.

I didn't update the actual code to print the docs, though, so it'll break badly.
It's commented out for now.