sitifan said:
3. It was a can of peaches that your friend bought at a 7-11 last night.
4. It was a can of peaches which your friend bought at a 7-11 last night.
emsr2d2 said:
Sentence 4 needs a comma after "peaches".
sitifan, note that these sentences can be interpreted in two different ways. Using a comma with sentence 4 is not only preferred (though IMO optional), but also guides our brains into the meaning that/which

-)) works best with
which.
Meaning 1: [I’m making a assertion that] a can of peaches is the thing that your friend bought at a 7-11 last night.
With this meaning,
that is more correct (though you could get away with
which due to the blurring that is increasingly occurring), and you cannot use a comma.
That starts a defining clause.
Meaning 2: It was a can of peaches, [and I'm adding the related or clarifying detail that] your friend bought it at a 7-11 last night.
With this meaning,
which is more correct (though you can get away with
that) since it starts a non-defining clause. A comma must be avoided if you use
that (don't ask me why) but is preferred if you use
which.
sitifan said:
5. It was at a 7-11 that your friend bought a can of peaches last night.
6. It was at a 7-11 where your friend bought a can of peaches last night.
Sentence 5 identifies the place your friend bought the can as a 7-11 (we don't know which one). Using
where for this meaning is incorrect, but you might hear it sometimes.
If you change "a 7-11" to "the 7-11," both sentences can be valid and share the same meaning if used in the right context. They would identify
which 7-11 the speaker is talking about.