Frequency-domain hydrodynamic modelling of dense and sparse arrays of wave energy converters