Does anyone know if there is a specification or standard that defines typical instrument cutouts and fastener patterns for an aircraft like a Cessna 172?
In the commercial transport world most instruments are built to ARINC specs to fit in standard rails, standard tray sizes etc. Many systems have standard electrical connector types and even pin assignment layouts.
Standards enables cometition among avionics manufacturers and that competion helps keep prices down for operators.
I don't expect things to be as well defined in GA, but I'm certain every instrument OEM wants you to retrofit to their product as easily as possible.
Airframe builders usually want to drill one set of holes that works for most reasonable customer choices too.
Not COMPLETELY different in the GA world (I have a foot in both GA and Commercial). Depending on the instrument, there are standard sizes, but the hole patterns may be very different. Most instruments have 4 evenly spaced fastener holes (at 1:30, 4:30, 7:30 and 10:30), but some attach from the back of the panel and some from the front.
The panels are analyzed or tested for your particular instruments and panel configuration.
It isn't as tightly controlled presumably because the consequences of a GA aircraft having issues doesn't impact quite as many people.
Aircraft Spruce also sells the tooling to die cut the openings. The one thing to be watchful of is that gyros are mounted with slotted fasteners holes to allow alignment with vertical, and some have adjustment knobs that require relief.
We do custom panels on a waterjet. The issue is visibility of the instrument panel / PFD. If I cut a hole to fit the altimeter, but I can't see it through the yoke, it won't "fly". There are installation requirements, but those are pretty simple to meet.