Effect of aspect ratio on the energy extraction efficiency of three-dimensional flapping foils