Generalized matrix C*-algebras and representations of Hilbert modules