Allow usage with an array of target elements

I think this feature would be very helpful and provide good performance for those who need it.

Should I build it for the PR?