From a very quick glance, you can now use Connect-MicrosoftTeam, sign in with O365 account and use a command called Set-TeamArchivedState.
I should imagine you could export the list of Teams into CSV, import CSV into script, use a loop to archive each row of CSV.
Here's the link to some of the commands: https://docs.microsoft.com/en-us/powershell/module/teams/set-teamarchivedstate?view=teams-ps