The stock market’s performance beneath the surface of the S&P 500 is shifting lately.