This is a semi simplified version of what I am doing, but it should represent the problem I am having. I am actually juggling about 20 variable in the 'production' version. They are not arrays though(just simple variables).

Code:

$Name = "name1, name2, name3,name4"
$Prefix = "pre1, pre2, pre3, pre4"
$arrName = split($Name,",")
For Each $Element in $Name
Path = $arrPrefixElement $arrNameElement
If Not Esist (Path)
create Path
Next