Basically, you’ve got it right.
Ideally, a filter should be close to the source of odor and on the intake side of the air flow, and connections should be as close together as possible for best volume flow. This means all hardware/ducting inside the grow space, vented to just outside the grow space. Any changes to that setup is a compromise from the ideal.
Many times growers run into situations for various reasons that make it impossible to achieve the “ideal” setup though, so they start moving parts outside the grow space. Some just the fan, some the whole thing, it depends on their unique situation.
Some leave the filter in the tent, and run ductwork to the fan outside the tent where it blows into the room. Others will add more ductwork to the fan and pipe it somewhere else. Nothing’s changed in the order of hardware, just longer duct runs are made between them. (This will reduce volume, and higher fan speeds will be required)
Some put the whole assembly outside the tent, to free up headroom space to get more height from their light. Since the filter has one open end and one closed end, the order needs to be changed, and it then needs to be moved to the exhaust side of the air flow. It’s not that much different, but all the fan pressure built up before the filter will seep odor out of any little seems or holes, if there are any. For the overly paranoid (me before it was legal), the filter and fan can be in the grow space, and a short run of ducting can run outside the tent to another filter for double filtration. That really helped me when I could still catch a slight hint of odor when I walked into the house from a single filter. Again, reduced air flow.
Of course if venting outdoors, a filter can be optional. It’s still recommended, just to keep the fan motor area clean from dust buildup. Charcoal doesn’t filter particles, but filters do come with a cloth cover for that purpose. (Cloth can go on the inside of the charcoal can if used on exhaust end of airflow, and outside of can if used on intake side of airflow. Of course it won’t do any good for the fan if it’s on the exhaust side. It’ll just keep the charcoal from plugging up quicker I guess.)
Of course none of this will matter when you open the door to the grow space in the middle of flowering. It’s gonna smell. Then an outdoor ventilation might serve better, or a room where the door can be closed, and the entire room scrubbed through the carbon filter before leaving the room door open to the house again.
I will add that it’s not about doing it the “right” way, it’s about doing it the right way for your unique situation. We all have different hurdles to overcome and every space is different, if even just the climate it’s in.
And yeah, when it’s legal, odor is just about personal preference then.