If you look at the source code of get_template_part function, you'll see:
function get_template_part( $slug, $name = null ) {
do_action( "get_template_part_{$slug}", $slug, $name );
$templates = array();
if ( isset($name) )
$templates[] = "{$slug}-{$name}.php";
$templates[] = "{$slug}.php";
locate_template($templates, true, false);
}
It creates an array of 2 template names: {$slug}-{$name}.php and {$slug}.php and use load_template to find the template file and include it (the 2nd parameter is true, which means include that file).
You can mimic this function to return the template file path instead of include it, like:
function my_get_template_part( $slug, $name = null, $include = false ) {
do_action( "get_template_part_{$slug}", $slug, $name );
$templates = array();
if ( isset($name) )
$templates[] = "{$slug}-{$name}.php";
$templates[] = "{$slug}.php";
return locate_template($templates, $include, false);
}
Usage:
// Don't load the template
$template = my_get_template_part( 'loop', 'archive', false );
// Or load the template
$template = my_get_template_part( 'loop', 'archive', true );
// Get the file name only
$template = basename( $template );
// Without .php extension
$template = substr( $template, 0, -4 );
You can play more with $template to get what you want.