How can I batch change document properties (i.e. initial view -> navigation tab) dependant on whether the pdf has a bookmark or not?
No, they can't be edited using JS. You can add a script to the file that changes the view setting when the file is opened, but you can't change the actual Initial View options with it.
I am able to run an action with the Action Wizard in Pro DC to do this, however this sets the properties regardless of whether there's a bookmark or not.
Does this action effectively add a script to the file? Or is this done some other way?
Only JS can work with conditions.
And no, that action doesn't use JS to make those changes. It changes the file directly.