connect a switch to two routers

Yep, the basics of ARP are explained here:
https://www.geeksforgeeks.org/how-address-resolution-protocol-arp-works/
essentially since all devices are in the same network, all devices can be reached by any other device “directly”, this is layer 2, everything is as fast as it can be.

For local devices there is then no routing happening, if you introduce VLANs (if actually this separation is needed) a managed switch (like the RB260GS) can provide the required features allowing to separate, filter and distribute traffic:
http://forum.mikrotik.com/t/using-routeros-to-vlan-your-network/126489/1