Responsive Images – Add srcset attributes to custom Images Function

I think wp_get_attachment_srcset() is what you are looking for.

$srcset = wp_get_attachment_image_srcset( $image['id'], array( 100, 100 ) );

Now you can escape the HTML and use it in your code.

<img src="https://wordpress.stackexchange.com/questions/276972/PATH HERE" srcset="https://wordpress.stackexchange.com/<?php echo esc_attr( $srcset ); ?>">