A generalized scheme for niobium and tantalum dichalcogenides intercalated with post-transition elements