Construct Min Bitwise Array II

Given an array nums and an integer targetOr, for each element target find the smallest non-negative integer i such that i | target == targetOr. If no such i exists, return -1. Unlike the simpler variant, i may need to supply bits not present in target to reach the target OR value.

Examples
Input: [[2,3,5],7]
Output: [5,4,2]
Hints

Construct Min Bitwise Array II

Given an array nums and an integer targetOr, for each element target find the smallest non-negative integer i such that i | target == targetOr. If no such i exists, return -1. Unlike the simpler variant, i may need to supply bits not present in target to reach the target OR value.