I was able to use hakamari's example as long as I only had items that had classes that could be found like string and boolean. Since I'm also using (CascadeChoiceParameter), and others, I got the same array error, and I had to convert all to the $class: 'org.biouno.unochoice.CascadeChoiceParameter' syntax to get it to work properly. I'm not sure why, but it sure was frustrating to figure that out.
newParameters.add([
$class: 'hudson.model.ChoiceParameterDefinition',
name: 'AWSenvironment',
choices: ['Development', 'Provision'],
description: 'where to deploy, most of the time will be Development'
])
newParameters.add([
$class: 'hudson.plugins.validating_string_parameter.ValidatingStringParameterDefinition',
name: 'HostName',
defaultValue: 'AutoBuild',
description: 'What hostname would you like?<br/><i>Your last name will be prefixed to this name</i>',
regex: /^[a-zA-Z0-9.:-]+$/,
failedValidationMessage: "Regular alphanumerics, periods, colons, and hyphens only!",
])