Improve and simplify handling of parameters

- Allow a parameter of type array
- Allow models to have parameters of mixed type, e.g. a number and an array
- Add some validation for multiple parameter sets
- Allow Gaussian models to have multiple parameter sets

This supersedes #1051.