For this kind of data, where each w[i] has one corresponding value, you should define a param rather than a set:
set S;
param w {S};
with corresponding data:
param: S: w :=
2 1
15 5
3 9
21 4
17 8 ;
It is easy to get the minimum. To get the index corresponding to the minimum, AMPL does not have an "arg min" function, but you can write the following:
param Lmax = max {i in S} w[i];
param L = min {i in S: w[i] = Lmax} i;
Or you could define "param Lmax; param L;" and then use "let" statements to assign these values at any later point.