Multipartite Entanglement Generation Assisted by Inhomogeneous Coupling