title: Minizinc "filling in gaps"
body: <p>I would like to &quot;complete&quot; an array in MiniZinc as follows.</p>
  <p>Say I have an array a=[A,H,J,D,C] which is associated to certain integers between 1 and 6 (injectively), e.g. n=[4,2,1,6,5] so here the 3 is missing. I would like to output the array a corresponding to an increasing ordering of n and filling in the missing element (3) by a fixed content, say XXX. In the example it would be</p>
  <p>[A,H,XXX,J,D,C]</p>
  <p>The way I considered for now is to create a new array of 6 variables, and checking for all of them if they are in a and assigning them at the right position, and putting XXX if the position do not appear. This makes my program terrible slower (about five times slower!).</p>
  <p>Are there more efficient options to do so?</p>