// 2. indices are not constant -> flatten matrix and return [flattened_matrix][flattened_index_expr]
// indices are not constant -> flatten matrix and return [flattened_matrix][flattened_index_expr]
/// Converts a reference to a 1d-matrix not contained within an indexing or slicing expression to its atoms.