Fast algorithm to find the n1 th smallest number to n2 th smallest number in an array
If n2 (and therefore n1) are both small, then you can find the n2 smallest elements and ignore the first n1 ones.  These approaches are described by Arun Kumar and user448810 and will be efficient as long as n1 remains small.
However, you may be describing a situation in which n1 (and therefore n2) can grow (perhaps even linearly with the overall list length) and it is only their difference n2-n1 which remains small.  In this case you need a selection algorithm such as quickselect which will remain O(N) in this case.
I have an array, I attempt to find the n1 th smallest number until the n2 th smallest number in the array and store them in another array of size n2-n1+1. Here n2>n1 and both are realtively small compared to the size of the array (for example, the array size is 10000, n1=5, n2=20). 
I can sort this array first, and then retrieve the n1 th number, n1+1 th number until the n2 th number from the sorted array. But since n1 and n2 are usually relatively small compared to the size of the array, it is not necessary to sort the array completely. The algorithm should be able to stop in middle once reaches n2 I think. 
I wonder if there is any algorithm, maybe a modified version of certian sorting algorithm that is specifacally good (by good I mean fast) at this problem. You can either use Python code or pseudo code as an illustration, thanks!