I know it is way too late, but i stumbled accross a similar problem today and thought i'd post the fix for this so someone else might profit from it. In your environment, something like this should do the trick:
#set($counter = 0)
#set($split_arrVLAN_ID = $arrVLAN_ID.split(";", -1))
#set($split_arrVLAN_NAME = $arrVLAN_NAME.split(";", -1))
#foreach($vlanID in $split_arrVLAN_ID)
vlan $vlanID
name split_arrVLAN_NAME.get($counter)"
exit
#set($counter = $counter + 1)
#end
You'd have to provide the two variables in an array. So if you wanna get this configuration:
vlan 2
name Test
exit
vlan 3
name Fish
exit
vlan 25
name dontharmus
exit
You'd have to fill out the variables via Prime GUI or API like this:
$arrVLAN_ID
2;3;25
$arrVLAN_NAME
Test;Fish;dontharmus