How internal states shape neural computation