From what I been seeing, the bug that causes npc's just attack you for no reason, has something to do with vehicles. I have seen where the static population panic because Ms V is ... just ... driving. Random Police groups, and gang members instantly go hostile for just driving. As in, just driving no hitting anything, being a good girl and taking a casual drive. With the police, when they go hostile, that group will always will be hostile... what I mean is, when you die and reload, that same group of Police will always go hostile. Plus, you have a marker for criminal behavior, and all police become hostile. I had it so bad in one play through, the game became unplayable esp. when V is low level (around lvl5) . Only solution I found was to use a trainer, make V god mode and one shot kill, and just go through the gambit of police until they stop. Then I kept on playing normally.
Mobs will go hostile even though they are in a building and can not see you due to line of sight being blocked. For example pulling up to the clothing store in Pacifica, and the mobs in the quest location behind it and lower than the store just go hostile, and V enters combat mode. Or parking in the garage, the mobs behind and below, will go hostile and V enters combat mode.
I have a feeling the main issue is the new mini map associated to vehicles. More noticeable with gangs, as they go hostile the moment they enter the mini map. Police go through a 'detection' phase then go hostile.