Optimal configuration of large arrays of floating bodies for ocean wave energy extraction