I want to export all the files that are attached to all list items in SharePoint 2016. Is there a way to do this all at once, or does it have to be done one-by-one?
Not really all at once. To stay within support boundaries you need to use the API. What you could do is to restore DB to non prod environment and use direct SQL queries to the DB to get the data you need. The right SQL queries can be figured out with the SQL profiler.