ToneMelody works on any pin

The PWM is a built-in function of the ATMEGA-328 chip. It is one of the modes that the timer can be set to run in. This means that it is hard-wired to toggle one of the pwm pins, in the actual hardware of the chip.

The tone functions use the timer in a mode that when it overflows above a certain number, it triggers a function. This is a software application, because it is inside this function that the pin (any pin, not just PWM pin) is toggled. It is not a specific hardware feature of the chip.

I think this is correct, and that it answers your question.