Is it possible to get Edges of a 2D mesh seperated into lists

I am beginner in unity.

I need to take vertices (edges) of a 2D mesh and separate them into lists.
For example if mesh is split into 2 parts separate vertices into 2 lists and so on.

Is it possible to do this?