It's possible, yes, even using Jquery, there are several ways, if I'm not mistaken you can bind an event for example: "onClick" in the options and then when the user clicks you perform a function that adds or removes this value in the array, in case the value of the option you passing the option as argument could take like this: $(option).val();
to pass the option as argument you can do so
<option value="1" onClick="adicionarNoArray(this)">Option1</option>
I'm sorry for the "If I'm not mistaken", I have not jQuery for some time, but I'll even test it and then post a comment here saying whether it worked or not.
EDIT
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script></head><body><selectid="select" multiple>
<option value="1" onClick="adicionarArray(this)">Option1</option>
<option value="2" onClick="adicionarArray(this)">Option1</option>
<option value="3" onClick="adicionarArray(this)">Option1</option>
</select>
<script>
var valores = [];
function adicionarArray(option)
{
var index = valores.indexOf($(option).val());
if(index != -1)
{
valores.splice(index, 1);
}
else
{
valores.push($(option).val());
}
console.log(valores);
}
</script>
<body>
</html>
This should solve your problem. It may not be the best way to do it, and another may come with a better response, however you can then put the values as they are selected in an array and work with the values.