How to short certain pins on a 7x9 array
There's the conceptually easy way, that would take as many elements as you have keys to emulate, and the trickier more efficient way.
Conceptually easy. Find out what voltage drop you can tolerate at each closure. Place a relay, or FET, or optocoupler output closure at each intersection that will give you less than this voltage drop. This is expensive in components, as not only do you need many 10s of switches, but you also have to control them from your Pi.
More efficient. The keys obviously belong to a multiplexed array. Take the row drive pins into your Pi, and drive one of the column pins at the right time, when the relevant row pin is active. Ideally you'll have an oscilloscope so you can see what's happening, and to debug any timing problems you run into. Potential timing problems are that your Pi will will not be able to respond instantly to a row drive going active. Your typewriter may tolerate this lateness, or may not. You may have to experiment with your column response timing.
A hybrid, which does not trouble the Pi for a fast response. Connect a multiplexer to the drive pins, and a demultiplexer to the response pins, and program their routing from the Pi. These will almost certainly respond fast enough. If they have sufficiently low resistance, then you could use analogue muxes like HC4051 to do both jobs.