Guards can initiate arrest dialogue behind locked doors
(You need to be close to the door, sometimes). This doesn't happen in vanilla (or at least the results of my testing) as they initiate arrest dialogue once the door is unlocked and opened and they can see the player character.
Here's my test save: Arrest_Behind_Locked_Doors.omwsave