` <# You can create the function, call the array results and then store them in the array again using a foreach-object loop. Such as: #>
<# not sure it is nessesary but is always a good practice to declare the array outside the function. #>
Function make-Array { param ( $something ) <# some code here, param is optional #>
$some_array = @(time1, item2, item3)
<# make sure to call the array here, this will print out all the contents of the array. #> $some_array
return #leave this blank }
<# This is where you can get the array stored. #>
Make-Array $data | Foreach-object {some_array += $_}
<# This will now take each deserialized output from the array in the function and then add them back again to the array, or anything else you'd like. Sicne the arrya is already global you do not need to pass it as an argument to the function nor do you need to declare it inside the funciton. #>`