sched: Update task_state_arraypwith new states