Bend a cylinder by its middle
Array modifiers are actually an interesting way of doing this. Start- and endcaps make all the difference. 

First I defined the radius with am empty and extruded a circle, rotating it 5 degrees into a wedge around the empty. Then I fitted the start and end cap. Start cap is easy, end cap needs a bit of tweaking.

The rest is another empty that I rotated 5 degrees around the pivot empty to act as Object Offset for the modifier.



Simply adjust the steps in the modifier, duplicate and apply. Pipe factory.

And that's the result:



As long as you don't need a pentagon, the 5° increments will cover most cases.