(1) If a defendant is charged with a felony and is found guilty of an offense by a jury, the jury shall fix punishment in a separate proceeding as authorized by this chapter.
(2) Except as provided by §§ 5-4-601 — 5-4-605, 5-4-607, and 5-4-608, the court shall fix punishment as authorized by this chapter in any case in which: The defendant pleads guilty to an offense;
(3) The defendant's guilt is tried by the court;
(4) The jury fails to agree on punishment;
(5) The prosecution and the defense agree that the court may fix punishment; or
(6) A jury sentence is found by the trial court or an appellate court to be in excess of the punishment authorized by law.