We developed a full-wave formulation to model massive number of vias in high-speed printed circuit board (PCB), through silicon via (TSV) and electric band-gap (EBG) structures. This analytic method employs the equivalent magnetic frill array, Galerkin's procedure, image theory and Fourier transform to simplify the problem from a 3D configuration into a 2D frame. Based on Bessel's functions and addition theorem, the final matrix equation is formulated analytically without using any numerical techniques. The new method is purely from the boundary conditions. Consequently, it is simple, versatile, efficient and accurate. Numerical examples demonstrate good agreement between our analytical solution and commercial software (HFSS) for through silicon and PCB vias. The model is also used to study the EBG wall and cavity, for leakage fields.