Lateral interfacial coupling in ferromagnetic and ferrimagnetic systems