Suppose I have a list
mydata = {3, 14, 15, 92, 65}
and in some cases I want to manipulate it as a list, like for reading from and writing to a file, or for operations to be applied to all members.
But I also want to access each member individually, and I like to name the first member alice instead of mydata[[1]], and the second bob instead of mydata[[2]], and so on. Something like union in C. Can Mathematica do this?
edit (attempt to clarify, on request)
In the example I need a way to redefine mydata as
mydata = {alice, bob, cindy, dan, elise}
so that I can access members as
a = mydata[[1]] (* assigns 3 to a *)
b = bob (* assigns 14 to b *)
and
mydata[[2]] = 42
elise = 100
results in
mydata == (3, 42, 15, 92, 100}