It's the choke's constriction that determines the pattern density. Barrel length has mainly to do with the handling/balance of the gun and the sighting radius. Ballistic considerations are not a major factor in determining barrel length.
Minimum length barrels, the neighborhood of 18 1/2" are for HD/tactical guns.
Barrels in the neighborhood of 20" are typically for shooting buck shot or slugs. These typically have two piece or optical sights. "Buck" guns are used because they have a shorter killing range (than high powered rifles) and are considered safer in populated areas.
Barrels 26" and longer are used for target and field applications. The shorter the barrel, the quicker the gun will handle. Longer barrels swing smoother and absorb more recoil.
A point to ponder: Since pumps and auto loaders have longer actions than double guns, there is ROUGHLY a 2" correspondence. A 26" pump barrel would have the same application as a 28" double barrel.
Years ago, barrels in the 24-28" range were usually for fast birds or skeet targets. But, there has been a trend towards longer barrels. When I started shooting skeet in the 60s, the guns had 26" barrels. My present skeet O/Us have 28 and 30" barrels. Trap shooters, who use less swing and more precision will go for 32" and longer barrels. These longer barrels also work for turkeys and water fowl. Then there's grandpa's ol' goose gun with it 36" barrel.
As a general rule of thumb, bigger guys will find the longer barrels seem more natural. My friend, member BigJimP is taller and heavier than me. Generally, for all target types, he's comfortable with a longer barrel than I am.
For a general purpose shotgun, consider a pump/auto with 26 or 28" or a O/U or SxS in 28 or 30" configuration. Try many guns and see which ones feel the most natural to you. Use your least constrictive choke on skeet and doves and your tightest choke on water fowl, turkeys and long handicap trap targets. Use the chokes in between on the targets in between.
Of course, you can hunt with a 20" coach gun but it will have a choppy swing, a lot of kick, and the sort sighting radius won't help you acquire nor keep your target.