Sounds like it's storing the data in $a as a hashtable
Here are a bouple links that have some good information.
http://stackoverflow.com/questions/...reach-loop http://powershell.com/cs/blogs/eboo...ables.aspx Once you know how the hash table is holding the values you can loop through them
I hope that helps.
$myHash = @{}
$myHash["a"] = 1
$myHash["b"] = 2
$myHash["c"] = 3
foreach($key in $myHash.keys){
$myHash[$key] = 5
}