There are two properties on the Parameter object that let you set its value; expression and value. The expression property is exactly equivalent to the "Expression" field in the Parameters dialog. It is a string and is interpreted using the units assigned to that parameter. For example, if the expression string is "5" and the units are inches then it will be interpreted as 5 inches but if the units are millimeters it will be interpreted as 5 mm. Because it's a string it can also contain the units as part of the expression. For example "5 in", which will always be interpreted as 5 inches regardless of the units assigned. You can also have equations like "5/2" or "5 in/3 in" or "5 cm/2 in" or "Length/2", etc.
The second way of setting a parameter value is to use the value property. The value property is a floating point, not a string. This is an API only capability and is not provided through the user interface. When using the value property the number always assumed to be in database units, which means for lengths the value is always centimeters and for angles, it is always radians. Using the value property doesn't change the units of the parameter. For example, if you have a parameter whose unit type is inches and you set the value property to 2.54, the parameter will still be in inches but its new expression will be "1".
As far as getting an array of numbers, I'm not sure what you're asking. A parameter is a single value, not a list, so you'll need to choose which number from the array to use or possible use the array to set the value of multiple parameters.
---------------------------------------------------------------
Brian EkinsInventor and Fusion 360 API Expert
Website/Blog:
https://EkinsSolutions.com