You can do handstand pushups with your elbows in or out, depending on which you find more comfortable. Keeping your elbows out is going to allow for better balance, making handstand pushups much easier.
If you keep your elbows in, you will probably find doing a handstand pushup becomes more challenging. When I keep my elbows in, I find I can do fewer reps than if I keep my elbows out.
If you want bigger shoulders and triceps, I highly recommend keeping your elbows in. Just remember to try both and see which one you can do effectively. Both ways are going to seem foreign to you at first until you grow accustomed to handstand pushups.