There are sentences where they could both be used, but (at least in examples I can think of) they'd have slightly different meanings, and thus can never be used interchangeably.
For example "Group of men" would be a gathering where all those present are men. "Group for men" would be some kind of organized club specifically designed for men. A woman could walk over and join the group of men, but probably couldn't join the group for men.
In another example, if I have a "cup of pens" on my desk, it is just a regular cup that happens to contain pens. Maybe before it was a cup of water, and I needed someplace to put my pens so I used it. If I have a "cup for pens" the cup is there for the specific purpose of being full of pens, and I would not put other things in it.