Ray theory for scattering by two-dimensional quasiperiodic plane finite arrays