Exploring the effects of d10 and d0 cations on the magnetic interactions in perovskite structures