Keeping $attributes but adding a rel (D7)
If I understand you right you just want to add the rel attribute to the $attributes array before you call l(). Something like this:

$attributes['rel'] = 'the_rel';
print l('&lt;div class="magnifier gradient"&gt;&lt;/div&gt;' . $image, $link_path, array('html' =&gt; TRUE, 'attributes' =&gt; $attributes));


That will add the an item to the $attributes array with a key of rel and a value of the_rel, and won't affect any of the other attributes already in the array.