Inserts an element at the specified index position, replacing the existing element.
$[ScriptVariable]::set(int index, String str)
The following example illustrates the syntax for the replace list method (using the $recipients list variable created in the add example):
$recipients::set(1, "Building 12")
print($recipients)
['Engineering Group']['Building Twelve']['Winston Smythe']
['Engineering Group']['Building 12']['Winston Smythe']