Goat shelters are relatively easy. Far easier than a good coop, IMO.
Fencing is a whole different matter. Lots and lots of sturdy fencing, "fencing that can hold water" and you're getting close to enough. I have cattle panels with 5 foot wire all attached to 4-6 inch treated posts placed 8 get apart. Most of the posts also have horizontals at 50 inches to which I attached the cattle panels and fencing. Hot wire going in soon as well, to and bottom.
My smallish dry lot cost almost $1000, but has, so far, contained them. The shelter was already there, I converted a shed.
Feed is relatively cheap, mostly hay when there is no browse available. Right now I'm using fresh cut grass from my field, I let it grow to about 10-12 inches that make a couple passes with the mower and collect it. This weekend I start putting fencing around my wooded area, probably close to 800-1000 feet (or more) of multistrand hot wire.
Darn animals are work.
Yeah fencing them in is a different story.