What you need is like this where you allow the BizTalk mapper to work out the looping itself
Note: You also don't need the Value Mapping functoid as it is easier just to suppress the whole add-on from the Equal functoid.
Output
<ns0:Response xmlns:ns0="http://Biztalk">
<Uniquenumber>167</Uniquenumber>
<totalamount>2000</totalamount>
<add-ons>
<add-on>
<name>Joe</name>
<amount>10</amount>
</add-on>
<add-on>
<name>Pie</name>
<amount>20</amount>
</add-on>
<add-on>
<name>Levis</name>
<amount>40</amount>
</add-on>
</add-ons>
</ns0:Response>
If you want to see what looping the map is going to do, look in the Error List after doing a test, and double click on "Double-click here to show/hide compiler links" and then it will look like
The looping functoid is useful where it isn't a repeating element, or there are multiple independent repeating elements that need to be looped over to go to a single repeating element, in which case you link all of the source nodes to the same looping functoid, and link that the the destination.