One idea
Use the simplest structure that gives the operation cost you need. Arrays and strings are good for ordered scans. Maps and sets are good when fast lookup or frequency matters.
When to pick what
Pick an array when you need index access, sorting, prefix sums, two pointers, or a sliding window. In Python, use list. In JavaScript, use Array.
Pick a string when the input is text, but remember many strings are immutable. If you build many characters step by step, collect pieces in an array or list, then join.