For example, could a witch or wizard cast it on a trunk, or something else you could plausibly lock?
To the best of my knowledge, the books and movies never show anyone cast Colloportus (or Alohomora for that matter) on anything other than a door or window, but I'm not sure about Pottermore, Harry Potter and the Cursed Child, etc. The ending (-portus) suggests it works on doors only, but we've seen other spells with strange etymologies.