I'm afraid it is you rather than the compiler who is confused. Of course the array is called "name". That you passed a String variable also called "name" as an argument to the method is irrelevant. You could probably do what you want to do by using reflection, but I think it is highly unlikely that it would be worth the trouble.
Of course, I have no idea what you are trying to achieve, but you might consider passing the array itself as an argument to the method, or using a Map<String, ArrayList> or something like that instead.