It is hard to know what are you exactly trying. Basic 2d engines use three layers: a background, a foreground and the rest in the middle. Things that can overlap and can be overlapped by a character are normally cut in two pieces, so the down part is drawn in the background and the upper part in the foreground, been an unwalkable tile the 'connection' between both.