Using wp_trim_excerpt to get the_excerpt() outside the loop

I’m building a theme that is going to show excerpts on the homepage for potentially dozens of posts. I don’t have manual excerpts on all of my posts, so $post->post_excerpt is empty for many posts. In the event that there isn’t a manual excerpt, I would like to use the built-in get_the_excerpt() function, but it isn’t available outside the loop.