Brittle stars

Some species, however, are hermaphroditic or protandric.

An excerpt from the article 26 facts about Brittle stars
Protandric animals produce male and female gametes at different times. Hermaphroditism is the occurrence of male and female reproductive glands in the body of one individual at the same time or the presence of a hermaphroditic gland in its body.