Using bool mask on weights

If I use a boolean mask [True, True, False] on a weights vector W1[mask], but I will not create a new W1 vector by assigning W1 = W1[mask], will backpropagation work normally (on the “True” elements of the vector)?