Hi Dennis,
In the past it was quite common for general cargo and multi-purpose ships with lots of derricks/masts and high cranes to have a radar antenna in the foremast.
Nowadays it's not so common anymore besides some special ships.
Regarding radars fwd on ferries, they are only used during docking / undocking. Some big container ships had them also, even some had them on the stern as well. But as they cost extra money it's quite seldom to see them now on big and even bigger containerships.
Magnetic compasses in principle have to stand clear of surrounding metal structures, which is quite difficult in practice. There is of course always metal in the vicinity like a funnel, mainmast etc. Thats why they are being compensated with small iron bars and balls. This is done during sea-trials when the ships turns 360 degrees so it can be compensated for every direction.
Cheers,
Roy