array of positions

How would you go about creating an array of stored positions that a player can move to?

Also make it so the player cannot move to a position that has a wall or an enemy on it?

Usually you create empty game objects (waypoints) and place them at the desired positions in the Scene view. You can get all of them in a GameObject array with FindGameObjectsWithTag at Start, or create a public Transform array in the player script and drag the waypoints to it in the Inspector.

To check if something is blocking some waypoint, use a LineCast - if it returns true, something is blocking the way:

  if (Physics.LineCast(transform.position, waypoint.position)){
    // something is blocking the way!
  }

Make sure each waypoint is at approximately 1 unit above the ground - if too high or below the ground, LineCast may return wrong results.