Jelly has an "untruth" atom:
Ṭ. This takes a non-empty array of positive integers and returns a Boolean array with 1s at the indexes in the input. For example:
[1,3,5,6]Ṭ ⁼ [1,0,1,0,1,1] Ṭ ⁼ [0,0,0,0,1] [2,1,1,2]Ṭ ⁼ [1,1] [5,4,3]Ṭ ⁼ [0,0,1,1,1] Ṭ ⁼ 
Note that Jelly uses 1-indexing, and that duplicate values in the array have no effect.
Your job is to take a non-empty array of positive integers and output the result of applying
Ṭ on the array. If your language has a builtin with this exact behaviour, you may not use it. You may also choose to use zero indexing if you wish (so the above examples become
[0,2,4,5], , [1,0,0,1] etc) and take non-negative integers in the input array.
You may use your language’s
false values instead of
0, so long as they are the Boolean values rather than general truthy and falsey values (e.g.
0 and non-zero integers). You may also take input as a set if your language has that type. The input is not guaranteed to be sorted and may be in any order. The output may not have trailing zeros (or any other "trailing" values).
This is code-golf so the shortest code in bytes wins.