Always generate thumbnail after sideloading image

You’ll have to use wp_generate_attachment_metadata and wp_update_attachment_metadata to do this.

// sideload it into wordpress (generates various sizes)
$thumbid = media_handle_sideload( $file_array, $post->ID );
if ( is_wp_error($thumbid) ) { // deal with error here }

// If this function is undefined in the environment where it is to be used,
// such as within a Shortcode, use the include function:
include( ABSPATH . 'wp-admin/includes/image.php' );

// create the thumbnails
$attach_data = wp_generate_attachment_metadata( $thumbid, $file_array['tmp_name'] );
wp_update_attachment_metadata( $thumbid,  $attach_data );

// kill existing attachment first, if any
wp_delete_attachment(get_post_thumbnail_id($post->ID), true);

// and finally associate post with new thumbnail
set_post_thumbnail( $post, $thumbid );

wp_generate_attachment_metadata creates the thumbnails. wp_update_attachment_metadata makes sure they are actually part of the media object