Ty codes are typically handed out at the mall — real-world shopping centres running promotional events rather than an in-game location.
Keep an eye out for Ty-related displays and promotions while you're there.