On Mar 20, 3:07   򮮮 
> I have an array of objects, and the objects have some attributes.  §
> like to be able to modify selected elements in the array based on any of
> those attributes.

See Array#select and Array#find.

e.g.
albums.select{ |a| a.band=="The Beatles" }.each{ |a| a.like=true }

> Using collect like this works, but it seems awkward to me to have to
> iterate through the whole array just to find the element (or elements)
> that I want to change.

Without some previously-established alternative lookup mechanism, such
as a Hash, any implementation is going to have to walk through the
entire array to find multiple matching items. Array#find will stop as
soon as it finds one item, though.

For example (assuming you still need your albums array):

# Do this once
albums_by_band = albums.group_by{ |a| a.band }

# Do this for each time you need to look up an array of albums by a
band
albums_by_band["The Beatles"].each{ |a| a.like = true }