Microsoft has some very clear and relatively simple guidelines for dealing with the List View Threshold. In that, I have found that the first three tips in that document (Indexed Columns, Filtered Views and Folders) solve 95% of the cases where this comes up. The remaining 5% generally have unusual business requirements and need a custom solution.
5,000 items is well beyond the limits of what a human can reasonably process so I'm assuming that you need this for some other purpose, such as exports, archives or complex reporting. For that, you might need to export your lists to Access as it batches requests and is not subject to the List View Threshold, though Access can only process lists, not libraries.