I am going to assume that when you say you want to see a message like the following:
(1st Passage, 4th Choice & 2nd Passage, 3rd Choice)
...that you want to track both:
a. the Name of the Passage that the choice was made in.
b. the Link Text of the choice that was selected.
1. You can use an Array story variable to store each of the above two pieces of data, you would initialise this variable within your project's startup tagged special Passage using the (set:) macro and the (a:) macro like so
(set: $choices to (a:))
2. You can use individual Datamap objects to contain each of the pairs (passage and choice) of data, and the code to do this looks something like the following. It uses the (dm:) macro to create the object and the name property of (passage:) macro to obtain the Name of the Current Passage.
(dm: "passage", (passage:)'s name, "choice", "2nd Choice")
3. You would use what is commonly known as Link with Setter (or a Setter Link) to both add the relevant data to the $choices array and to forward the Reader to the next passage. This link type generally consists of a (link:) macro combined with a (set:) macro and a (go-to:) macro, and look something like this
(link: "Link Text")[
(set: $variable to "value")
(go-to: "Target Passage")
]
4. Your 1st Passage would combine the information from points 2 & 3 together and look something like the following
This is the (print: (passage:)'s name), please make a choice.
(link: "1st Choice")[
(set: $choices to it + (a: (dm: "passage", (passage:)'s name, "choice", "1st Choice")))
(go-to: "2nd Passage")
]
(link: "2nd Choice")[
(set: $choices to it + (a: (dm: "passage", (passage:)'s name, "choice", "2nd Choice")))
(go-to: "2nd Passage")
]
(link: "3rd Choice")[
(set: $choices to it + (a: (dm: "passage", (passage:)'s name, "choice", "3rd Choice")))
(go-to: "2nd Passage")
]
(link: "4th Choice")[
(set: $choices to it + (a: (dm: "passage", (passage:)'s name, "choice", "4th Choice")))
(go-to: "2nd Passage")
]
5. To display the contents of the $choice array you will need to use the (for:) macro to loop through each Datamap contained within it. The following builds a String value ($output) containing containing a formatted representation of each of the pairs of data, it uses a (if:) macro to determine when to add the "&" joiner, and it uses a (replace:) macro to inject this String into a named hook which will exist in the 2nd to 4th Passages.
I named the passage Previous Choices
{
(set: $output to "")
(if: $choices's length > 0)[
(for: each _choice, ...$choices)[
(if: $output is not "")[
(set: $output to it + " & ")
]
(set: $output to it + (_choice's "passage") + ", " + (_choice's "choice"))
]
(replace: ?choices)[$output]
(set: $output to "")
]
}
6. Your 2nd Passage would look very similar to your 1st Passage except the Target Passage of the Setter Links would be different, and there would be code to display the Previous Choices. To do the later you will use a (display:) macro to execute the code contained in point 5, and a named hook to receive the the output generated by said code.
Previous Choices: |choices>[(display: "Previous Choices")]
This is the (print: (passage:)'s name), please make a choice.
(link: "1st Choice")[
(set: $choices to it + (a: (dm: "passage", (passage:)'s name, "choice", "1st Choice")))
(go-to: "3rd Passage")
]
(link: "2nd Choice")[
(set: $choices to it + (a: (dm: "passage", (passage:)'s name, "choice", "2nd Choice")))
(go-to: "3rd Passage")
]
(link: "3rd Choice")[
(set: $choices to it + (a: (dm: "passage", (passage:)'s name, "choice", "3rd Choice")))
(go-to: "3rd Passage")
]
(link: "4th Choice")[
(set: $choices to it + (a: (dm: "passage", (passage:)'s name, "choice", "4th Choice")))
(go-to: "3rd Passage")
]
7. Your 3rd Passage and 4th Passage would look very similar to your 2nd Passage except the Target Passage of the Setter Links would be different again. So to make each of these passage simply copy the code in point 6 and change the Target Passage referenced by each of the (go-to:) macros to be the relevant new target.