added error code return if element is not found in constarray::index()