For many photonic devices, crosstalk between densely packed waveguides poses a major problem leading to unreliable or inefficient operation of the device. In this work, a general method for modeling the crosstalk, not only in straight waveguide arrays but also in curved ones, is introduced. The method is based on a matrix analysis of electromagnetic field coupling between closely spaced waveguides. As an example, we show how bending of waveguides in an array reduces the crosstalk. The approach can help overcome the crosstalk problem in a variety of photonic integrated devices, including phased waveguide arrays, arrayed waveguide gratings, optical multiplexers, and high-density interconnects between optical and electronic components.