Three hikers and a dog are walking through the foliage on the hillside.
People are walking along the beach.
The people are either on the beach or a verdant hillside.
There isn't foliage on the beach
One cannot be walking through foliage on a hillside and walking on the beach because there is no foliage on a beach and beaches are located at the lowest point typically.