You absolutely must read and understand the Cocoa Memory Management Rules, in particular the fundamental rule which states:
You take ownership of an object if you create it using a method whose name begins with “alloc” or “new” or contains “copy” (for example, alloc, newObject, or mutableCopy), or if you send it a retain message. You are responsible for relinquishing ownership of objects you own using release or autorelease. Any other time you receive an object, you must not release it.
Now, look at how you got hold of anArray. You used the method objectForKey: It does not start with alloc, nor new, nor does it contain copy. Nor have you retained anArray. Therefore, you do not own anArray. You must not release it.
The above quoted rule is the most important thing to know about programming with Cocoa on the iPhone or Mac without garbage collection. One of the other posters here came up with the acronym NARC (New Alloc Retain Copy) as an aide memoire which is quite handy.
Let's apply the rule to the variable called obj in your code. You obtained that with a call to alloc, therefore you are responsible for releasing it. However, you then obtained it again (overwriting the previous value) with a call to objectForIndex: so after this you must not release it. However, the first value did need releasing and has now leaked. in fact, the alloc line is unnecessary.