Refactor type_info to dynamically generate array types.