We can achieve this by using one simple query.
First of all let me show you how my product archive and single product pages look like.
Here is my product archive page:
And product page looks like:
Now we need to change product status to out of stock.
Here is the query that will do the job for us:
Update wp_postmeta Set meta_value = 'instock' Where meta_value = 'outofstock' And meta_key = '_stock_status'
You can implement this query either through phpmyadmin of your site or by using any other GUI DB tool like SQLYOG.
Write and execute this query in the terminal.
Here is the terminal of phpmyadmin:
Now your archive product page will look like this: