How can parts of a laser beam be made visible while others left invisible using something electronically controllable (for example, another laser beam crossing it, or a magnetic field, or heat, etc).
There is no magic here. To see the laser beam, the beam has to use light in the visible frequency and some of the light needs to enter your eyes. Unless the beam is pointing at your eyes you won't see it. Remember, in coherent light all the photons are traveling in essentially the same direction, with the same frequency, in the same phase.
If you want to see portions of the beam you need photons to be reflected / scattered into your eyes. You can use dust particles, fog, smoke, clear or mostly opaque sheets of plastic / paper / cloth / cotton / wire, etc. The point is that you must put something into the beam path that will affect some of the photons while not also stopping the whole beam.
If you want a switchable system you should look into "smart glass" which uses an electrically controlled liquid crystal to scatter light.
A piece of white paper is the most common device to show a laser beam. The beam is visible on both sides of the paper.
Fix it on a electronically controlled motor shaft you can rotate the paper into the laser beam. If precise control is necessary: just align an iris aperture to the center of the laser beam.