Yes, they can. Past perfect is intended to describe an event that happened prior to some other event: "I stepped through the door and suddenly realized I had been there before."

Talk Doctor Online in Bissoy App