The chicken you get in the grocery store, Cornish X, are butchered early. Usually between 6-8 weeks. Any longer than that you will likely start to lose them. Obviously at such a young age the males won't cause trouble. I would raise them separately from a main flock. Cornish X grow amazingly fast but also produce a LOT of manure.
The slower growing broilers such as Freedom Rangers, Kosher Kings, red and black broilers are generally butchered between 10-14 weeks. They do not have the health problems of the Cornish X and have a more chickeny flavor. At that age the cockerels wouldn't be causing too many issues. They can lead normal chicken lives if you find there are some you don't want to butcher, unlike the Cornish X.
If you get extra layer breed cockerels from a hatchery, no matter how long you grow them out they will never have the meatiness of the broilers. Depending on how long you'd want to raise them, you would probably have to consider putting the males in a separate grow out pen.
How long to grow them out would be up to you. You can start butchering them at 12-16 weeks before the hormones really kick in. They won't have much meat but will still be tender and make good stock. You can wait until 20+ weeks when they will have more meat but you will definitely need to cook them differently. Crock pot, pressure cooker, or long slow braise. They do have more flavor than the younger birds. Great for soups, stews, shredded chicken for sandwiches and enchiladas. They make outstanding stock. Of course one benefit of the layer breed cockerels is you can stagger the butchering. Take care of the annoying, problem ones first and save the rest for another day.
If you were interested in trying males from a hatchery, I can say McMurray's Turkens grew at a surprisingly quick rate and reached a respectable size early. am tempted to grow out their Bielefelder males at some point too. Cackle's Chanteclers were also an impressive size. We still have one of those males in our flock.