I am not sure just what you are working on. Since I do not know it is rather hard to know if the bolts in question are head bolts or valve cover bolts. Does the round flange to the right of the bolts in question need to be removed before those bolts will come out?
Those aren't the stock cover bolts, but look like they've been there a while. Hopefully they're the right thread and length. Looks like a later kz400 valve cover?
My usual go-to method is to soak them in a penetrating oil overnight, then get a pair of vise grips/locking pliers onto them as tight as you can and turn them out. It looks like you should have enough access to do that.
Also note that everything should be metric so be sure to use metric tools, that could be why two are already stripped. They're aftermarket bolts, but (hopefully!) they will be metric replacements. If they're not you'll have bigger problems.
A good hit on the allen head with a copper/brass rod after heading up the area do shocking and breaking the internal corrosion come loose!
Genau! That is the idea behind the center punch technique: to knock the corrosion loose. With the small point of the punch, you are focusing the energy from the hammer directly on to the threaded portion; when you hit it with a larger thing, the energy from the hammer is spread over a larger area, including the surface that the fastener is sitting on (so to speak).
I have also read that when a fastener is tightened, the threaded part stretches a bit. The center punch is supposed to reduce the tension in the fastener, basically by pushing the bottom of the screw head down toward the threads. I have no real way to verify that but have had good success in freeing stuck Philips/JIS screws with a center punch; the Allen screws look like they would fall into the same category.
It won't work as well (or at all) on hex head bolts because there is a lot of metal between the top surface of the bolt and the threaded bit (and it will be much harder to deform).
1979 KZ400 Gifted to a couple of nephews
1967 Yamaha YCS1 Bonanza
1981 Yamaha XT250H
1981 KZ440 LTD project bike
2013 Yamaha FZ6R