The problem with using the attribute mechanism is that you have to know the type ahead of time and you will have to use the same type for every value. I don't think that model fits a metadata hash that could have disparate  types.