Fix typo.
Py3 errors.
Avoid using regexes where they're not needed.
Allow passing tuples by the programmer.
Transform.output_type should respect overridden custom_lookup and custom_transform.

Previously, class lookups from the output_type would be used, but any
changes to custom_lookup or custom_transform would be ignored.
Add some more tests for multidimensional arrays.

Also fix slicing as much as it can be fixed.