Wave power extraction and coastal protection by a periodic array of oscillating buoys embedded in a breakwater