Transform parameters as either hashes or arrays