Is a router required to set up a network?
No. Only to route traffic between networks.
Suppose I have just an Ethernet wire and then I fix it up to 3 computers.
That's pretty hard to do with modern Ethernet cabling since only star configurations are supported.
Can I then say that these computers are now in a network?
Yes.
If they are in a network now without that router, with just the Ethernet wire alone, how and where is the network IP address and all that subnet mask going to be generated from? It is likely going to be a private address since it is local but who would assign the 3 computers with their own host IP without the router?
First, IP is not a network requirement. You can have a network without any IP at all.
Second, many nodes can assign themselves IP addresses in a mechanism designed specifically to make a bunch of devices connected by a switch "just work".
Lastly, human beings can assign IP addresses and subnet masks to each device. Alternatively, you can run a DHCP server on one of the machines. You don't need a router to assign IP addresses.