Nonsingular systems of generalized Sylvester equations: An algorithmic approach