Normalize an array of numbers or objects to a specified range.