I think your code is very similar to something im doing. From what I can see when you navigate back to the page you are starting a new session each time the page is loaded again. Try placing this underneath you starting of the session code.
if(!isset($_SESSION['cart_array'])){
$_SESSION['cart_array'] = array();
}