You can put them just about anywhere you want IF you have plenty of turnover (flow) through the tank to keep detrius suspended and moving around so the filter can pick it up...
When I ran a canister filter I'd put the input/output on opposite ends of the tank to get the largest amount of distribution before recycling.