Venting through a roof vent or exhausting them in the attic could cause moisture problems and rot.
Venting kitchen exhaust fan through roof.
That is five feet upwards along the slope of the roof and away from the bottom edge.
Be sure to extend the pipe up at least 2 to 3 above the roof to prevent snow buildup from causing problems.
You can buy the proper flashing to install it on a flat roof and a roof cap that has screen around it to prevent insects from entering.
In either case do not vent into the wall or the attic.
On the outside you will see the wind baffle that prevents snow from blowing in.
Also be sure to place your kitchen vent at least 5 feet upwards from the eaves of the roof.
Use a proper roof top exhaust hood if you must go through the roof.
If you want to replace the range hood and exhaust fan above your stove and vent it to the outside and the stove is against an interior wall you have several options.
If it sits on an inside wall venting through the attic and out is a better option but if it is on an outside wall it is more practical to vent through the wall.
But the rule of thumb is to route it the shortest and straightest path to daylight.
Yes you can vent a range hood through the roof using a 6 single wall pipe.
Vent your bath and kitchen exhaust fans through the roof through a special roof hood.