Algebrized approach for the finite element analysis of heterogeneous viscoelastic structures