We consider the two-dimensional (2-D) problem of the H-polarized plane wave scattering by discrete arrays made of finite number of periodically arranged circular cylindrical nanowires. Using the Fourier expansions of the field in local coordinates and addition theorems for cylindrical functions, we perform analytical regularization and obtain a block-type matrix equation. This equation is cast to the Fredholm second-kind form that guarantees, after truncation, the convergence of numerical solution. In computations, we consider the gratings with shifted layers made of silver nanowires in the visible-light range of wavelengths. The scattering and absorption cross-sections and near-field patterns are calculated and the interplay of plasmon and periodicity-induced resonances is studied.