Three train lines across Perth have been shut down after a carriage carrying passengers derailed on Monday afternoon.