In Illustrator, the envelope works like a mask, it hides the parts of the object that is outside the envelope. It goes further by changing the shape of the object to fit the shape of the envelope.
The Custom Shape Tool in Photoshop has some shapes that can be used to create patterns. these patterns can be used to make decorations for artwork, decorations for mockups of packages and clothing, ...