How does hardware performance differ between a PC and a laptop? An RTX 3070 in a laptop, for example, should be less powerful than a 3070 in a PC, right?
It depends on the overall configuration of the system and not on whether it is a laptop or PC. There are also laptops that have normal desktop PC hardware built into them.
Laptop hardwire is usually more expensive because the components have to be very small.
a 3070 in a laptop is sometimes slower when it is clocked more slowly
It often happens that laptop hardware is slower because it has to be very small and because it can't be cooled as effectively in such a tiny case. In addition, there are certain 'laptop versions' of many GPUs and CPUs, which sometimes have very different technical data than their desktop version. But it's not always like that.
As a rule, laptop components are forced into a tight corset in the form of restrictions on power consumption and heat dissipation. There's no room for large coolers in a laptop, and the device should not go completely wrong within a very short time, even with battery operation.
Especially with CPUs there's a very clear separation here, both AMD and Intel use the letters you and H to identify laptop chips.
As a comparison:
The Ryzen 5600X, the desktop version, can draw over 65 watts. The laptop version, the 5600U, on the other hand, has to cope with just 25 watts.
It looks quite similar with the GPUs. These are also subject to different limitations. Nvidia has the MaxQ and MaxP variants, the former are more limited, the latter a little less, but both usually lag behind their desktop equivalents.