Sure, generally making a coop in a stall or two of an existing barn works pretty well
If the barn has a poured slab floor in good condition, that is a real plus because it helps immensely in predator- and rodentproofing. If it is a dirt floor, you need to predatorproof it somehow (which can be more challenging for a section of an existing barn than for a freestanding coop) and unless you *install* a slab or well-set-large-pavers floor you can probably expect to have a difficult rat problem sooner or later.
Also make sure to predatorproof the upper parts of the coop, as basically all barns are pretty permeable to raccoons, possums, weasels, etc (in fact they are preferred *hangouts* of raccoons and wintering weasels). In a high ceilinged barn it may make more sense to just build the coop its own ceiling rather than try to predatorproof vertical walls all the way up to the roof.
You'll want to make sure you have good ventilation thru the barn wall; but unless the barn itself is very damp and dank, housing the coop inside a larger barn generally makes ventilation problems MUCH MUCH easier to solve, especially if dealing with northern winters. If you get hot summers, a coop in a large barn is sometimes much cooler; OTOH in a small barn you can have extra heat problems, it just depends on your particular setup, just something to be aware of and think about.
Bear in mind that chickens are dusty and you don't want to be storing stuff that you don't want dusty right next to the chicken 'room', especially if you are leaving it with mostly wire walls.
You will want one nestbox per 3-4 hens, locate them distinctly lower than the roost so as not to tempt hens to sleep (and thus poo) in the nestboxes. There are lots of threads on making nestboxes or recycling existing things as nestboxes, you might try browsing this section and you'll find lots and lots of ideas
Good luck, have fun,
Pat