Re: engine swap
Bayliners did come with 20 and 25 inch midleg length depending upon year and model. Measure from the inside of the transom clamp down to the cavitation plate. It will be close to either 20 or 25 inches. Your options are to use the same length midleg as you have or buy an engine with a different midleg length and swap powerheads.
Control cables and wiring are the same so you can use your controls as-is. Lower units are the same so if shaft length is the same they are directly swappable too.