Minecraft wiki entry for Fence, associated text: If a carpet is placed on top of a fence, a player can jump onto the carpet, while mobs cannot (except rabbits).
Getting hit by someone else (or shooting yourself with a Punch enchanted bow while sprinting forward) while in midair can cause the knockback to propel you over a fence you would not be able to jump over normally.
Placing a carpet on top of a fence does not reduce the fence or wall collision box down to one block, it just provides a platform one block high around the fence/wall to make it easier for climbing on the top of the fence.
Projectiles get stuck in the collision box of the fence and remain there if shot from upward.