types2: refactored TFunc into a general type constructor TCons and added arrays