Handle TEXT_DATA and lists.

This changes the codegen so that every field get its own block with a redeclaration. Keeps the code handling names and values separate.