Of course that will not work, because in Elixir variables are immutable - once you set a value then these value never cannot change.
However you were this close to finishing it. First of all - Elixir do not have loops, it has comprehensions. Which mean that for do not just iterate over data, it will also produce new list. You also can iterate more structures to create product. So in this case you can do:
# Traverse and extract data
for %{members: members, ratings: ratings} <- list,
# Zipping will create binary tuples from 2 lists
{id, rating} <- Enum.zip(members, ratings),
# Create result value
do: %{member_id: id, rating: rating}