Sri Lanka's inexperienced side created history in Pakistan as some players found form and other lost their places.