First off, I have done a few experiments with Ditto, but some of this info comes from serebii.

When Ditto Transforms, it 'becomes' the target Pokemon.
Transform can target Ditto's partner in a double battle.
It copies the target's species, type, attacks (5 PP each), stats, and stat changes.
It does not copy HP or status effects.

Metal Powder and Quick Powder only work before Ditto Transforms.
After transforming, it is no longer Ditto. (Copies species, remember?)
On that same note, transforming into a Pikachu will let Ditto use a Light Ball.

Since Transform copies stat boosts, you can copy things like Belly Drum without the HP penalty.
Treat Mew and Smeargle the same way.