First, you're casting the contents of the map to the type "array of String." Are you sure the values in the Map are String arrays themselves, and not (for example) just Strings?
Secondly, you've allocated a String array which is appropriate for storing one String for each value in the map; then you're iterating over the map and trying to replace that array, over and over, with one extracted from the map. That's definitely not right.
If the values are Strings, and you're just trying to get them in an array, you might try something like