Exploring The Stability of Square Planar Carbon In Surface Carbides of Co, Ni, And Beyond