Its the same ikhtiyaar that ALLAH uses in deciding where we will be born, to which parents, in which country, which person to be chosen as prophet, which ummat to be chosen for the duty of ‘Shadah’ in the world. These is solely Allah’s discretion without having anything to do with our freewill. We have freewill in a separate limited sphere in deciding our moral existence as to which path we prefer to choose as far as Good and Evil are concerned. Allah’s knowledge in that matter does not forces us into doing any of that act as opposed to the decisions mentioned in the beginning.
In this specific Ayaah , the verses are addressed to Mushrikeen-e-arab who used to do open shirk admittedly and used to pray to Angels whose sculptures they had made. So Allah said to them that it is Allah’s will/Amar that He creates whatever He chooses, whoever he chooses and at whatever position He appoints them at; It is not even in their (Angels) power to change this decision of Allah. So what’s the basis now for your shirk?
It hope this will clarify it to some extent.
For further discussion on fate/Destiny, you can refer to the following topic as well. Thanks