I have considered this matter, mainly for the purposes of planning my funeral. My intention has been to be buried in my Army uniform, but not because of any strong religious belief. While burial was practiced from ancient times (Genesis 23:4), the only generalized command in Scripture to bury someone has to do with an execution (Deuteronomy 21:23). The New Testament reveals that when people die, the saints go immediately to heaven to be with Yeshua and the sinners go somewhere else. Thus, what is done with the corpse is really immaterial. No one’s salvation is going to hinge on whether a lifeless body is buried or cremated.
As for Yeshua’s instruction in Matthew 10:5 the context has nothing to do with funeral customs. Yeshua sends out his disciples to take the Gospel to Israel, but orders them not to “go in the way of the Gentiles.” In normal usage the Greek word translated “way” refers to a road or highway. However, set in the context of Yeshua’s instructions “way of the Gentiles” is an idiomatic expression meaning “do not go to the Gentiles.” He amplifies this instruction by also saying not to go to any city of the Samaritans. At the time there were several Greek cities in Galilee and Judea, so his instruction could have the literal meaning of “don’t take any road to a Gentile city.”