I'm no exceptional shooter, but given 2 days of prep (Saposto get a week of 'range week' but sometimes it doesn't happen) to get used to the pecularities of the particular rifle...
I'll give 8-9 hits outa 10 on the target at 500.
(M16, Military ammo)
Have tried with an M4.... It's embarasing...
(Although in the Gunsite 223 class I used an M4 with a Tridjacon Reflex site to hit peper popers unknown distance out to 400... But I'll admit I was at the top of my game (Training wise) at that time)
16" is a good length. Some would say something a little longer might be good, but that depends on a lot of factors. If you are concerned with accuracy, barrel type is more important than length. For example, a good stainless or chrome moly is going to be a bit more accurate than a chrome lined, but most feel chrome lined is good enough for government work, and it is arguably easier to clean and takes a bit more of a beating.
What weight bullet do you intend to shoot? Up to 62gr, you should be OK with a 1 in 9" twist barrel. Heavier than 62gr, I'd opt for a 1 in 8" twist barrel.
I say get at least a 1:8 twist. That will give you some of the best range of bullet weight. My 20 inch 1:8 twist will get .5 or better moa with 55grain all the way up to the heavy stuff.