Types of NPC
Can be broken down loosely into NPC and Bot
NPC by definition doesn't play the game. Bots however simulate a human playing the game
NPCs can be; Player controlled, in the background (and not even interactable), essential to the story, provide items/ info/ etc. they have a hundred and one uses. NPCs (and Bots) can be used to improve the difficulty (either making it harder or easier) by adding or subtracting them as well as improving their play.
A tried-and-true way to get players to care about a video game character is to use what I call the Yorda Eﬀect. Named after the non-player character (NPC) from Ico (SCEA, 2001), Yorda is a young girl that Ico has to protect from enemies and help traverse the environment as the pair attempt to escape a mysterious castle. ... If Yorda dies, so do you.... The character needs to oﬀer limited assistance to the player in the form of healing, assisting in combat, providing extra ammo, or solving puzzles. If designed correctly, this co-dependency between characters creates a protective relationship in which the player comes to genuinely care about the welfare of the NPC.
From Level UP The guide to great video game design
Read the above and pull out their top 3 tips for creating compelling NPCs
How are NPCs implemented in Unity
Your tutorials showed you a few different ways, these were mostly unfriendly AI- aimed at attacking and damaging you and chasing the player.
Movement was accomplished by either the AI moving in a straight line always towards the player or using a NavMesh and NavMeshAgent. The former is bad but does at least allow you to move in 3D, the latter is easy to use but has it's limitations. There are other alternatives too both on the app store and creating your own.
I intended to write a brief easy to read summary of A* path finding, then I came across this post from Ray Wenderlich's site. It's a much better depiction than I could write and even has cats, who doesn't like cats.
NPCs and Waypoints
A lot of games require AI to be moving around continuously, to do this we implement waypoints.
Waypoints are invisible placeholders within the gameworld that can be referred to. Generally they may have little more than their transforms (pos, rot, scale) and perhaps some logic (in the form of collider/trigger and script). They could even be attached to other things such as meshes and objects.
The AI implementation then sends it to that place, when it reaches that place it may through the use of triggers and colliders trigger some more logic. You can create a looping list- when it gets to the end, return to the start, there are lots of possibilities.
Alternatively, you may want NPCs to follow commands, in the standard RTS like below the player clicks and a raycast collides with the ground the place hit is sent to the NPC and it then goes there.