How to stop featured image thumbnail [set as background image] on blog index page just repeating same image across all posts

Or is it because im trying to add it to the css class .has-post-thumbnail which is applied to all posts?

Yes, set_featured_background() gets first post from the loop and add .has-post-thumbnail to styles. All posts that have thumbnail (with class .has-post-thumbnail) will have the same background.

Try setting the background in the template file responsible for displaying posts on the home page, probably in content.php or front-page.php.

<?php
    $attr_style="";
    if ( is_home() && has_post_thumbnail() ) {
        $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
        $attr_style=" style="background: url(". $url.'); background-size: 100% 100%;" ';
    }
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); echo $attr_style; ?>>