Fix exponential running time in expression translator

It now runs in linear time
Add more documentation for arrays
Make more methods final on parametric base classes
Implement getDescription() in ParametricOperator
Add json type
Change specialize() to accept TypeManager
Add array/map to json cast
Add map cardinality function