a
, the list variable, is a variable, so by definition it can vary. But you could always write your own function as wrapper to do the setting and inside the function, you can check for this.
setMyList[m_List, idx_, value_] := Module[{m0 = m},
If[idx == 2, m, m0[[idx]] = value; m0]
]
and now call it
a = {1, 0, 1, 1};
setMyList[a, 1, 99]
(* {99, 0, 1, 1} *)
But when the index is 2, then it will not change
setMyList[a, 2, 99]
(* {1, 0, 1, 1} *)
The index that is supposed not to be change is hard coded inside the function. But you can change that if you want and pass that as well as an extra parameter.