This is called invoking the admiralty jurisdiction or the in rem jurisdiction of a court, which is limited to certain courts in India. However, if you are relying on the CPC then you are invoking the in personam jurisdiction. Where, the opposite party is a real or juristic person unlike an admiralty action where the opposite party is the ship. Ship arrest is used as a mechanism to detain the ship. This will force the shipowner (in most cases represented by his insurer/P&I Club) to submit to the jurisdiction of the court by depositing the necessary security.
If the ship owner chooses not to submit himself to the jurisdiction then the court is free to sell the ship, and such a sale will extinguish all prior claims on the ship.
All this will not be possible if Order 39 is invoked.