Retrieve Image Attachments Getting Post Thumbnail Image First

First, exclude the featured image (= post thumbnail) from the query, then set up the posts array as combination of the featured image and the other images.

Put this directly below $args = ... and above $attachments = ...:

if (has_post_thumbnail($post->ID)) {
    $featured_image = get_post_thumbnail_id($post->ID);
    $args['exclude'] = $featured_image;
    $attachments = array(get_post($featured_image)) + get_posts($args);
} else