While working on the elementtype attribute, I felt that the type attribute handling in AttrBuilder is overly repetitive. This patch converts the separate Type* members into an std::array<Type*>, so that all type attribute kinds can be handled generically.
There's more room for improvement here (especially when it comes to converting the AttrBuilder to an Attribute), but this seems like a good starting point.