A:AnswerThe canon M series mirrorless camera uses it's own lens attachment size. But there is an adapter that Canon offers for EF and EF-S lenses to easily fit M series cameras.
So, no it won't fit M3 outright, but can with an EF to EF-M lens adapter.
A:AnswerThe lens is designed for APS-C sensor cameras, the 5D Mark 4 is a full frame sensor camera. So, it would probably physically fit, but would not be ideal for your camera.