This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Your problem is indeed unclear. But, whatever I get out of it is:
You are filling an array object with some date/month type strings or something. Now, then you are feeding this to a map by map.put("months"+i, month_with_data);//i is a counter . Finally, when you try to retrieve values from map you get the key distinct but, value is always the last index in array.
If it's like so, then the simple thing is that you are doing something wrong while filling your Array.
Also, ("months"+i, month_with_data); is not the correct way of doing things. A map is a key-value pair. Now, what you are doing is you are assosiating an entire array object to a key. Well, what I understand is that you don't want that. What you want is simple key-month instance relationship. So, instead of binding the Array just, bind the month instances directly to the key. The map wouldn't automatically understand that, it has got a collection and should attach the keys for that automatically.
Well, it would be better if you could make the problem more clear unless it is something different.