$.map
creates arrays, and inside the function you check for the values you'd like, and if they match you return the elements value to the array, like so:
var arr = $.map($('#allrecords option'), function(el,i) {
if ($(el).data('s-type') == 'X' && $(el).data('n-type') == '9')
return el.value;
});
arr //is now ['xxx', 'lmn']