Yes we understand the E21 did come with an M20. This page will be more about how to install and wire an E30 M20 into the E21 chassis. Also the only way to get the m20 into the E21 chassis normally is with the 323 subframe and a 323 transmission.
We are offer M20 mounts that allow using the M10 subframe and complete E30 M20 and g260. This does require an electric speedometer or a speedometer drive.
We will add to this How to over time but below is a bit of wiring information.