Taking items from containers of any kind (chests, cabinets, boxes, bookshelves, etc.) is perfectly "legal" and does not aggro any NPCs.
Destroying furniture (beds, lights, etc.) will count as stealing. Additionally, destroying capsule-type items, such as pots and vases, will also count as stealing, so be careful where you swing your weapons. As far as I can tell, destroying buildings is not considered hostile (unless you also displace furniture at the same time, for example by breaking a block under a bed).
If you take too many items within a short period of time, any nearby guards in the village will come to attack you. Other nearby NPCs will also run from you. You can either run away and come back a few minutes later (sometimes the guards seem to forget you), or you can kill the guards. If you decide to do the latter option, try to keep the fighting localized to a small area - if you're on a quest for a nearby villager and they see you fighting a guard, you will automatically fail the quest.