Optimal configurations of wave energy device arrays