Intersection and decomposition algorithms for arrangements of curves in the plane