You should have 2 or 3 good location options
What's min length hunter that will accommodate a gen set.
Size of gen depends on your electrical needs. I have seen generators down below under the nav seat, under the sallon settee, over the main engine of a center cockpit,behind the main engine, cockpit lazerett,in the stern locker on swim platform,hanging lockers, cockpit lockers (on a power boat).
You have a hunter 42 passages right? You should have 2 or 3 good location options. Just keep in mind good all around access for servicing. And get one that is going to be dependable and run as quietly as possible. A gen in an enclosure is highly recommended.
My panda and I are not on good terms right now. But when I am in a raft up in close quarters etc. People on the next boat over on either side of me say 5' away can not tell if she is running. My main airconditioner is louder the the generator.