You could have simply used the first N-type transistor that you could find... Connect the Emitter/Source to GND and PWM the base(+resistor)/gate of that. And instead of connecting all the leds to ground connect them to the collector/drain. Should cost you <10 cents...
Heck, you could even do it without is you would stay under a total led current of 40mA (which is doable with modern leds). One end of each led to a single PWM pin and the other end to another pin.