One of the very first fantasy books I read was Patricia McKillip’s The Book of Atrix Wolfe. Though it is an utterly beautiful book with a heartrending plot, it exemplified much of what slowly started to bug me about fantasy: the setting and plot devices tend to be utterly European, drawing from traditional fairytales (and in particular from a strong Celtic tradition, as is evidenced by the figure of the Fairy Queen, and that of her husband, leader of the Great Hunt). Over the years, as I delved deeper into the genre, I realised that most settings were faux-European (especially faux-Celtic, rendered with varying degrees of skill and accuracy by various authors). Coming, as I did, from reading a variety of mythological books and historical mysteries, among which non-Western cultures were at least equal to medieval England in terms of pre-eminence, this seemed to me rather sad, and failing to do justice to the great variety of human culture across the globes and the time periods.
Fortunately, one of the other books that I read early on was Ursula Le Guin’s Earthsea Quartet, which, not content with reversing the race dynamics (her heroes are brown-skinned, the evil invaders distinctly Aryan), also drew heavily on Polynesian cultures as well as on Asian philosophies (the ending of A Wizard of Earthsea in particular has always struck me as exemplifying the yin/yang dichotomy). When I started writing fantasy some years later, I wanted to step away from the traditional faux-European culture that seemed to be the backbone of most secondary world fantasies (though this has changed in the last decade, it has done so very slowly).
It’s, of course, not as easy to derive inspiration from Ancient China or Ancient Mexico as it is from European cultures–European cultures are distant from me mostly in time. Though it has changed, the French culture of the 15th century still has many common points with the culture of 21st France, where I live. Most non-Western cultures are distant both in space and in time (I’ll leave aside China and Vietnam, which are a special case for me). The culture of Ancient Mexico, for instance, has common points with the culture of modern Mexico–but both are cultures I’m unfamiliar with. This made it a greater challenge for me: I had to adapt to a mindset that was very, very different from my default one. 
For me, that’s the single most important step of drawing inspiration from another culture: if I don’t get this right, then my Aztec warriors will end up sounding like English knights in costume, and I might as well not have tried. Your mileage might vary; I think it’s disrespectful to raid a culture for the colourful exotic trappings and not put in anything of its basic values, though there is a question of where to draw the line between drawing inspiration and rendering the exact same culture in a secondary world fantasy (a thorny problem I mostly skirt around, as I’m writing historical fantasy set in the actual Aztec Empire).
The main goal when starting a piece is to move my default thinking from 21st-century France to, say, 15th-century Mexico, for the duration of writing. I always want to get to the point where it is mostly unconscious: this ensures I don’t need to think about making my characters “feel” Aztec, but can instead focus on their motivations and behaviour as individuals, while being sure that I don’t have them say anything spectacularly wrong (such as, for instance, expressing atheist ideas in a culture where religion remained a bedrock). The problem, I’ve noticed, is my default: when I’m not paying attention, it reverts to what I was raised with (and I think most people are the same. It takes an effort to see things from the perspective of someone else. I’m not saying it’s impossible, just that it’s seldom unconscious). This means that, in the midst of a scene, I can have characters spouting ideas about male and female equality (a superb notion, but a totally anachronistic one); or that my plot twists will suddenly rely on something typically modern such as belief in individual freedom (again, anachronistic for the time period). So I’d rather have a thick layer of period thinking underneath when writing. This involves reading. A lot. I pick primary sources (literature from the time period); secondary sources (scholarly articles, books for the general public); and children’s books (which tend to be sparser on the grander details of history, but a lot more focused on the nitty-gritty details of everyday life, invaluable for a novelist). It’s not always obvious to find such sources: it is way easier to find books about Medieval England than about Ming dynasty China or the Aztecs. But they do exist, and there are also a precious few internet resources which can be looked up online (with the usual caveat on reliability).
A problem I didn’t have, but which I can see arising, was if I’d intended to draw inspiration from a non-Western culture for writing secondary-world fantasy: I’d be even more careful than usual when picking bits and pieces, because those bits and pieces might not end up adding to anything coherent. Of course, it is always a risk when writing faux-European, but as a writer, I have a much better idea of what makes those societies tick–as opposed to more unfamiliar societies, where I’m already be struggling to make sense of who does what and for what reason. For instance, if I happen to want to make an egalitarian Aztec society where men and women can do the same things and be equally valued, then I’ll likely have to rethink the entire religious system as well as most social structures (one of the bases of Aztec society is the duality between male and female, which is transcribed at every level of the society, though it’s not immediately obvious to a casual observer). I can’t transplant the 15th-century Aztec Empire as a setting, change a large thing, and hope nothing else will change–from a political, social and economical sense, it won’t work.
One other thing to be aware of is that the tropes of fantasy (such as the quest and the chosen, God-blessed hero) also tend to be culture-specific: there are similarities between a Chinese and a French fairytale, but there are also a lot of differences, such as the greater emphasis put on families (a traditional Chinese hero who fails to take care of his aging mother wouldn’t be much of a role model, whereas European heroes can leave their families behind to seek their fortunes and never come back, without the problem of filial ingratitude ever arising). A lot of the tales from China and Vietnam that I know are very different from the French ones for a given time period, and I think it’s a worthwhile exercise to see what kind of narrative codes predominate in other countries of the world. There is a saying that story is universal, of which I am extremely wary, because it tends to mean that Western–and especially–American storytelling has become universal by dint of cultural encroachment (America holds the dominant position, and is therefore “exporting” its cultural dominance to all corners of the globe). Different cultures have different myths, and reading those often made for great inspiration–as well as encouraged me, as a writer, to think on modern narrative codes, in order to better understand what we’re writing and what restrictions we might be imposing on ourselves–and choose to break them, if I wish to.
I won’t deny it is a challenging undertaking, which involves a lot of groundwork. But there are rewards: researching other cultures made me discover tons of interesting facts, ranging from broad principles to tiny tidbits of cool information. It also made me step beyond my own mindset, and discover other ways and other tropes of storytelling; and besides contributing my own little piece to greater diversity in fantasy, it also helped me expand my horizons as a writer–and ultimately become better for it.
 — I haven’t mentioned asking people–it’s very useful to have referents from a given culture when you’re using it as a modern or futuristic background (in order to avoid basic mistakes, such as your characters’ names being wrong for the time period or social class, for instance–don’t laugh, I’ve seen it in more than one story set in France or Vietnam). For fantasy, which has a historical background, finding referents is a little bit more tricky: you can get someone from the culture in question to avoid the aforementioned egregious mistakes, but if you really want to get more mileage, you’re going to have to find someone conversant with the time period (if you grab a random Vietnamese, the likelihood they can tell you about daily life at court in the 15th-Century Lê dynasty is going to be rather low).