A thesis statement is usually associated with an essay or formal paper. "Essay" derives from the Middle French word "essai," meaning "to try" or "put to the test." Thesis in Greek means "position," implying a rhetorical preposition. A thesis is usually declared explicitly in the form of an argument or interrogative that the bulk of the text attempts to address.
Theme is usually much more elusive than a thesis and is typically not explicitly stated. Themes are commonly employed to establish some relation with the reader, to address some universal concept or evoke some particular idea. Themes in fiction are created with motifs, which are figurative patterns that suggest something underlying the story.
Narrative non-fiction has existed perhaps as long as the concept of history has existed. Julius Caesar's famous "Commentaries" are self-serving, exciting tales of military campaigns he personally undertook. A great deal of journalism from the 20th century is in the form of narrative non-fiction, blending the reporting of facts with a novelist's eye. The so-called "human interest" story is selective reporting used to maximum effect in order to express some theme.
Less common than narrative non-fiction is didactic or instructive fiction, which exists to instruct, rather than entertain. Much of this literature is political in nature. Primary examples include Ayn Rand's "Atlas Shrugged" and Upton Sinclair's "The Jungle," in which philosophical screeds are inter-weaved with the plot, characters and themes of a novel.