It's not quite clear what the actual problem here is. So here are some suggestions:
The IEnumerable-interface doesn't have an indexer. For
p[raj]
to work, p would have to be not a "plain" IEnumerable but an array or a List or something else that allows indexing. Otherwise you would have to use ElementAt(..) to get the element of an IEnumerable at a specified position:
m[raj] = p.ElementAt(raj);
(This has potentially a really bad performance because it needs to iterate the elements of the IEnumerable to find the n'th one.)
You can just call ToArray() on any IEnumerable to get an array with the same elements:
var m = p.ToArray();
If you want to limit the amount of elements from p that will be "put" into the array (as you seem to with your for-loop-predicate) you can use Take(..) to take just the first X elements:
int amount = ...
var m = p.Take(amount).ToArray();
If you can't solve your issue with these hints, please leave a comment and tell the actual error message you're getting.