In the world of Harry Potter a wizard can remove a part of their soul and place it into another object through the act of homicide, thus creating a Horcrux. Is the wizard able to direct their soul pieces such that they can choose what becomes a Horcrux? Tied into that question, it seems possible that a wizard can kill someone and not create a Horcrux (Peter Pettigrew killed Cedric Diggory but no one seemed concerned that Peter made a Horcrux), so how/why did Harry Potter wind up with a sliver of Voldemort's soul when it seems inconceivable that Voldemort's intention was to put one there?
Yes, a witch or wizard creating a Horcrux can choose the object into which the Horcrux is concealed. Speaking specifically of Voldemort's Horcruxes, Harry and Dumbledore discuss vessels for Horcruxes:
"And they could be anything?" said Harry. "They could be old tin cans or, I dunno, empty potions bottles . . . ."
"You are thinking of Portkeys, Harry, which must be ordinary objects, easy to overlook. But would Lord Voldemort use tin cans or old potions bottles to guard his own precious soul?"
Half-Blood Prince - Page 504 - US Hardcover
What is a little murky is whether or not an ordinary object can be used to create a Horcrux, or if an item of significance (Slytherin's locket; Ravenclaw's diadem; Gryffindor's sword; Hufflepuff's cup; etc) is required. The above passage is referring specifically to Voldemort.
Simply committing a murder does not create a Horcrux. It is one step required. Reference Tom Riddle's conversation with Horace Slughorn while Riddle was still a student at Hogwarts:
"But how do you do it?"
"By an act of evil -- the supreme act of evil. By committing murder. Killing rips the soul apart. The wizard intent upon creating a Horcrux would use the damage to his advantage: He would encase the torn portion--"
"Encase? But how--?"
"There is a spell, do not ask me, I don't know!" said Slughorn . . .
Half-Blood Prince - Page 498 - US Hardcover
J.K. Rowling has not revealed the exact steps necessary in making a Horcrux; according to the HP Wiki, J.K. Rowling plans on releasing the exact spell and process in her Harry Potter Encyclopedia; the process is apparently very gruesome.
An accidental Horcrux can be created, such as in the case of Harry.
"[...]on the night Lord Voldemort tried to kill him, when Lily cast her own life between them as a shield, the Killing Curse rebounded upon Lord Voldemort, and a fragment of Voldemort's soul was blasted apart from the whole, and latched itself onto the only living soul left in that collapsing building. Part of Lord Voldemort lives inside Harry[...]"
Deathly Hallows - Page 686 - US Hardcover
"You were the seventh Horcrux, Harry, the Horcrux he never meant to make. He had rendered his soul so unstable that it broke apart when he committed those acts of unspeakable evil, the murder of your parents, the attempted killing of a child. But what escaped from that room was even less than he knew. He left more than his body behind. He left part of himself latched to you, the would-be victim who had survived."
Albus Dumbledore - Deathly Hallows - Page 709 - US Hardcover
So, technically, when Voldemort cast the Killing Curse, it rebounded against him, severing yet another part of his soul. That part of Voldemort's soul sought out a living host, the only available vessel being Harry; it attached itself to Harry. How Voldemort managed to create this Horcrux without the apparently necessary accompanying spell being incanted, I am unsure.
ETA: Regarding Horcruxes, JKR has this little tidbit up on Pottermore:
Professor Quirrell served as a temporary Horcrux when Lord Voldemort's soul occupied his body.
Yes - the Dark Lord chose his Horcrux objects very particularly.
Wizards can clearly choose what objects they make into Horcruxes, since as Dumbledore explains to Harry, the Dark Lord preferred to use objects with a powerful magical history of their own.
“Lord Voldemort liked to collect trophies, and he preferred objects with a powerful magical history. His pride, his belief in his own superiority, his determination to carve for himself a startling place in magical history; these things suggest to me that Voldemort would have chosen his Horcruxes with some care, favouring objects worthy of the honour.”
- Harry Potter and the Half-Blood Prince, Chapter 23 (Horcruxes)
For the Dark Lord to select his Horcrux objects in this way, it’d have to mean that wizards can choose what object they encase a piece of their soul in to make Horcruxes. If they couldn’t place their soul piece into a specific object, then the Dark Lord wouldn’t have a choice in what to use.
The Dark Lord’s soul split when he was hit as it was destabilized.
The reason that the Dark Lord’s soul split and a piece embedded itself in Harry was because the Dark Lord had destabilized it so much that it fractured when hit, and that part found a living host.
JKR: But I think, by definition, a Horcrux has to be made intentionally. So, because Voldemort never went through the grotesque process that I imagined creates a Horcrux, with Harry, it was just that he had destabilized his soul so much that it split when he was hit by the back-firing curse. And so this part of it flies off and attaches to the only living thing in the room. A part of it flees in the very close-to-death limbo state that Voldemort then goes on and exists in.
- PotterCast Interviews J.K. Rowling, part 1 (December 17, 2007)
None of the spells done to intentionally encase a piece of soul in an object were used, that piece split off unintentionally, so the Dark Lord was unable to choose where it goes like with a Horcrux.