Both could use ->removeMany actually if this list is a HasManyList, so we can remove the whole foreach block all together.

The Unlink button shouldn't be shown on non RelationList types, since it is has no point in most other List types, unless it unlinks from all relations attached to the object (which could lead to orphaned records when used incorrectly!)