Joel,
One very important rule with MOSFET's such as the IRF510 which you appear to be breaking is that the Voltage from gate to source must not exceed some critical value. This is usually 20 Volts. If you are really applying almost 24 Volts to the gate when the source is grounded, then you are playing with fire. The datasheet or package will call this Vgs max or something similar. You can fix this by tweaking resistor values so that the gate voltage is lower. For example, change both resistors to 10 k, then the maximum gate voltage will be around 12 V which should be fine for you. How fast is your PWM going, by the way? If it is really fast, then you might use smaller resistors than 10 k, but if it is slow, you could use larger resistors.
But more importantly, I don't think your circuit makes any sense. The MOSFET is nearly useless, if you really built the circuit as drawn above, because when the PWM output is low, the MOSFET will be on, but the PWM will be sinking all the current that flows through the MOSFET, and when the PWM output is high, there will be no potential from the drain to the source, and hence no current flowing. So you could just as easily remove the MOSFET from your circuit above, and replace it with a short circuit and there would be no change in behavior. The whole point of the MOSFET is to handle large currents, or possibly to act as a variable resistor capable of handling some power dissipation. In a PWM circuit, I would expect the former.
This leads me to believe that you didn't really wire it that way. You probably have the PWM output going to the gate of the MOSFET, and the source of the MOSFET is directly grounded?
The LED array should also contain some kind of current limiting resistor setup, as mentioned in the article. It might be helpful if you drew out the details of the LED array, since they matter.
Also, is your PWM circuit getting hot at all? If you DID really wire the circuit as shown, I imagine there is a lot of current going through it, and I would expect it to get warm.
Anyway, if you use the MOSFET as a switch, you can put a lot of current through it (two amps maybe for the IRF510? I don't know the exact number off the top of my head, but it would be called Id max). As long as you are not exceeding Id max, then you can keep connecting LED's until the FET feels warm. It may be possible in some situations to exceed Id max without the MOSFET getting warm, so you want to do some calculations to verify that you are not doing that. (To do this, we would need to know details of the LED array box.)
--Mac