How to stop whole house water hammer?
Water hammer happens when there is too much pressure in the line when the valve shuts.  Ironically, it is a problem when the water supply doesn't have enough air, not water.  Since water can't be compressed, all of the pressure is transmitted to the pipe as mechanical force when the valve is closed, causing it to knock and rattle.  Reducing the water pressure can avoid the noise and may even go unnoticed with today's eco-friendly fixtures, but it is better to add arrestors so it can compress shock.
To reduce the water hammer effect, there needs to be a different place for the pressure to go.  Water hammer arrestors work by creating a compressible gap of air that can absorb the shock of the water hitting the suddenly closed valve.  They are usually installed at each fixture above the valve so that there is the least amount of shock on the line; however, a whole house water arrestor can work too as long as it can absorb excess water pressure.  An arrestor placed on the highest fixtures in the system can have the best effect as long as there is a path from each fixture to the air gap.
If it is new construction, there may be a PEX manifold which makes life easy.  But if not, to find the best place(s) to add a local arrestor:

Turn the water off and open every faucet to drain the system.
Close all the faucets and turn the water back on.
Turn on one faucet at a time, from the top floors down, until only water comes out, not air.  Pay attention to how long the air takes to come out and make sure to do both hot and cold.
The fixtures that take the longest to flush air have the longest path and need the arrestor.  If lower floors also spit air after upper floors are flushed, there is probably a siphon and they need arrestors too.

If the walls are closed on both sides, a quick test would be to add an external arrestor at the problem.  One like this mini arrestor can attach past the shutoff valve at the fixture.
My home was built in the 60's with all copper plumbing (even the sewer!) and we had water hammer that would shake the whole house.  I had local arrestors on the washer and a few toilets that helped, but the tub and shower were still loud.  When we renovated the upstairs bathrooms I added 6&quot; buffers to both and the problem has now completely gone away.