Duplicate addresses in transaction possible?
A transaction can have several inputs come from a single address and can have several outputs go to the same address.

It is also possible that there are more inputs in that same address and that they're spent in a different transaction or that money is sent to addresses which have already been used (and may or may not still hold money).

You may also want to have a look at this when coming up with data structures: https://en.bitcoin.it/wiki/Transaction_Malleability