Standard field rations, in some ways, hadn't really changed much since the War for Independence.
Military rations had always accounted for elements of meat and flour, supplemented when they could be by local scrounging, and based in large part on how close your unit/post was to the core of the army's logistical chain. Way out in the west in the 1870s, food was extraordinarily variable.
However, you'd more or less mostly get a stable supply of bacon, and a pound or so of flour (which, depending on your post and SOP, might be baked into hard tack or made into some other form of biscuit). A lot of these rations would be pre-prepared if you were going out on a patrol or a long-term scout of some kind.
At post, however, it was likely that you'd also have some sort of communal garden to grow hardy herbs and vegetables, which would vary by location.
What was missing from a lot of this that the Civil War had was canned rations. The army seemed to prefer salted meats and flour, although canned beans seem to have developed a reputation. An old marching adage for the cavalry implied that a unit would travel "forty miles a day on beans and hay," but the beans would likely be saved for expeditions in which cook fires might be unreliable.
So basically, you've got the ubiquitous salted meat (pork most likely, beef if available and cheaper than pork), some sort of fat, flour prepared in various ways, all supplemented by locally grown vegetables, meats either purchased locally or hunted, if possible. Trade with any locals was universal, so long as there were locals to trade with. Some kind of liquor was usually available, and it was often made into a fairly generous ration in the winter.
Slightly tangential, but I discovered this interesting tidbit from Ohio militia from the War of 1812, speaking on how they prepare their rations, which might allude to how generally universal army rations were until the 20th century. This from the journal of Samuel Williams, describing his rations in a letter to his wife.
[Our rations consist] of flour, fat bacon, and salt. The flour is kneaded in a broad iron camp-kettle, and drawn out in long rolls the size of a man’s wrist, and coiled around a smooth pole some three inches in diameter and five or six feet long, on which the dough is flattened so as to be half an inch or more in thickness. The pole, thus covered in dough, except a few inches at each end, is placed on two wooden forks driven into the ground in front of the camp-fire, and turned frequently, till it is baked, when it is cut off in pieces, and the pole covered in the same manner and baked.
Our meat is cooked thus: a branch of a tree having several twigs on it is cut, and the ends of the twigs sharpened; the fat bacon is cut in slices, and stuck on these twigs, leaving a little space between each, and then held in the blaze until smoked and cooked.
Each man then takes a piece of the pole bread, and lays thereon a slice of bacon, and with his knife cuts therefrom, and eats his meal with a good appetite. Enough is thus cooked each night to serve for the next day; each man stowing in his knapsack his own day’s provision.
Bacon sandwiches on unleavened bread? Sounds delicious.
The journal of Samuel Williams can be found here.
You would very likely find Forty Miles a Day on Beans and Hay by Don Rickey of interest. It's a little dated but it is absolutely stuffed with anecdotes and details of an enlisted soldier's daily life in the post-Civil War west.
Similarly, Glittering Misery by Patricia Stallard covers the same period, but focuses on officer's wives and other women on military posts. Again it centers on daily life and has a lot to say about food.
The other answer already covers a lot, but I'll add that in A Dose of Frontier Soldiering, the memoirs of corporal E. A. Bode, he talks about food a lot. One of the main staples was what he calls "Cincinnati chicken," which was salt pork that had been boiled a little to cook the salt out. That would be kept on hand for use as fresh meat.
He also talks a lot about hunting. For example, while stationed in Kansas, he complains that they set out for a bear hunt, but only returned with a raccoon. At another point, he and another soldier go fishing, catching trout with their hands. At one point he talks of a celebration marked by a "possum feast." Prairie chicken was enough to make "mouths water."
He does also mention gardening, although this included raising meat as well:
When a company was stationed at a fort they usually had a small garden [of] from one to five acres where a couple of members of the company raised enough vegetables to keep their table well supplied for the summer. In our company at Fort Sill the gardeners had the care of a dozen or so hogs and fed them on garden produce and weeds, in addition to the slop from the company kitchen -- which gave us a profitable addition to our mess in winter.
Bread was also a staple, and in some cases the men were responsible for baking it themselves. Bode complains of inexperienced bakers burning their bread, or being served loaves of fresh bread that were undercooked in the middle, (but "it went all the same.")
On the trail, food was less varied, generally bacon or salt pork and hardtack. This could be prepared multiple ways, and he notes at one point that the men were very grateful to return to camp and see that the cook had made them all a batch of hash.
Edit: and I forgot to mention that soldiers could also purchase food, and sometimes did if they found the rations lacking. One soldier in 1876 wrote in his diary about forts where "not one vegetable was to be had," despite the prevalence of scurvy. The men traded bacon, coffee, and flour for vegetables. On Christmas Eve, 1876, he and his bunk mate share a can of peaches that he had purchased for the hefty sum of 2 dollars (this may help answer your question about why canned food wasn't more common in the frontier army). The Christmas Day meal for the Fort was only bacon, hard tack, and coffee.
That story is from Kevin Adams' book Class and Race in the Frontier Army. Adams also noted that soldiers could also turn to local farmers for eggs, butter, meat and vegetables. Sometimes they'd go to Mexican, Chinese, and even Indian farmers for food. Adams, like Bode, mentions the prevalence of hunting, especially around holidays, when deer and turkeys were popular wild game.
It's also worth mentioning that not everyone ate the same things. It depended on where you served, and in particular what race you were: Adams noted that Buffalo Soldiers in the southwest often received inferior rations compared to what white soldiers got. At some forts, only the white officers for flour. "Poor meals, like poor horses, were constant companions of Negro troopers." In one case from 1885, the army decided to stop sending shipments of fruit and vegetables, prompting an anonymous officer to complain in the Army and Navy Journal that lemons were a basic necessity to stave off scurvy.